French police have arrested the main suspect behind an attack on soldiers in a suburb of the capital, Paris.