Fighting broke out between different police factions in Brazil after a pay demonstration turned violent.