Thermal stability of 2H-implanted n- and p-type GaN