US counterterrorism official resigns