François Hollande has reaffirmed that “France is at war” in a speech before a gathering of the country’s mayors in Paris.