The measure would tie President Donald Trump’s hands, and those of future Presidents, on critical foreign policy matters.