Judge investigated for using racial slur resigns