With the ousting this month of John F. Kelly as White House chief of staff, Mr. Mattis was the last of Mr. Trump’s old-guard national security team — leaving policy in the hands of Mike Pompeo, the president’s second secretary of state, and John R. Bolton, the third White House national security adviser.