After a near-unanimous House vote, the Senate agreed to quickly clear the bill for President Trump’s signature.