Thousands have been arrested as violent protests rage across France after police killed a 17-year-old during a traffic stop.