The question came as Mr. Trump openly discussed the need for James B. Comey’s successor to be “loyal,” according to an adviser to the president.