Commons defeats government to pass motion making no-deal more difficult