Napoli moved within two points of Serie A leaders Roma as they won a bad-tempered contest 2-1 away at Fiorentina.