Judge Greg Griffin of Alabama had complained on Facebook of being racially profiled by the police, prompting lawyers defending a white police officer to suggest he step away.