Former Barcelona and Brazil defender Dani Alves has a sexual assault conviction overturned on appeal by a Spanish court.