Effect of Ni charge states on structural, electronic, magnetic, and optical properties of InN.