Judge Magistrate Michael Bachman resigns after violent incident in courthouse