Former Brazil and Barcelona footballer Dani Alves has been sentenced to four and a half years in prison after being found guilty of sexual assault.