Nonstoichiometry and hole doping in NiO