Effects of oxygen stoichiometry on the copper NMR and NQR in YBa2Cu3O7−y