Students in France have set fire to schools and vehicles, including a fire engine, during increasingly violent protests over teacher shortages and run-down buildings.