The former NRL star Jarryd Hayne has left prison on bail after his sexual assault convictions were quashed.