Role of intrinsic defects in the electronic and optical properties of α-HgI2