A broad swath of senior leaders and FBI agents left the agency Friday — marking one of the biggest shakeups in years at the preeminent US law enforcement agency.