The French government has collapsed after Prime Minister Michel Barnier was in no-confidence vote.