Defects and doping in GaN