Police have arrested thousands of young people in France during protests demanding better school funding.