The president had remained silent as James B. Comey spoke to the Senate Intelligence Committee, but he took to Twitter on Friday.