(a) Except as stated in subsection (d), a lawyer shall not represent anyone in connection with a matter in which the lawyer participated personally as a judge or other adjudicative officer or law clerk to such a person or as an arbitrator, mediator or other third-party neutral, unless all parties to the proceeding give informed consent, confirmed in writing.