Andrew Bailey, a co-deputy FBI director, announced his departure from the bureau on social media on Monday.