Mr. McConnell told the president that before he could bring up legislation on the Senate floor, he needed a “public reassurance” that Mr. Trump would sign it, one person close to the talks said, speaking on the condition of anonymity to describe sensitive discussions.