Theoretical study of H chemisorption on NiO. II. Surface and second-layer defects