In Ms. Pelosi the Trump White House may have a willing partner on at least a handful of legislative fronts, including a huge investment in infrastructure, a hallmark of Mr. Trump’s campaign that often was lost amid coverage of his more controversial statements.