Oxygen-dosage effect on the structure and composition of ultrathin NiO layers reactively grown on Ag(001)