First‐principles identification of defect levels in Er‐doped GaN