Judge Hannah C. Dugan was accused of helping an undocumented immigrant elude federal agents who were waiting to arrest him outside her courtroom.