Dani Alves to be freed on bail after rape conviction