As late as early Friday morning, Mr. Trump appeared intent on declaring a national emergency at the border alongside the agreement to reopen the government, but Mr. McConnell and White House officials encouraged him to drop the idea, according to people familiar with the discussions who were not authorized to discuss them.