The abrupt move by Kash Patel, the bureau’s director, came as President Trump was ramping up his attacks on the country.