A lawyer for President Donald Trump arranged a $130,000 payment to a former adult-film star a month before the 2016 election as part of an agreement that precluded her from publicly discussing an alleged sexual encounter with Mr. Trump, according to people familiar with the matter.