France has erupted in chaos as masked rioters torched schools, beat up teachers, doused them in petrol and fought police.