French Prime Minister Sebastien Lecornu has stepped down, blaming deep divisions in parliament.