Senate rejects measure to restrict Trump’s Iran war powers as key Republicans shift votes