The court ruled Bill Cosby should never have been prosecuted due to a deal he cut with a former prosecutor.