The Senate approved a House-passed resolution aimed at reining in President Trump on Iran, marking the first time such a measure has made it through both chambers.