The withdrawal came with unusual speed, following what U.S. officials said were threats of an Iran-based plot against the installation.