Fiorentina have confirmed the signing of striker Alessandro Matri on loan from Serie A rivals AC Milan.