The discovery of hundreds of classified records at Donald Trump's home has thrust U.S. intelligence agencies into a familiar and uncomfortable role as the foil of a former president who demanded they support his agenda and at times accused officers of treason.