Notorious for leaks and chastened by previous security lapses, the White House went to unusual lengths to keep President Donald Trump’s Thanksgiving trip to Afghanistan under wraps, devising a cover story for his movements that included posting scripted tweets while he was in the air, administration officials said.