A systematic study of the ionization potentials and electron, proton, hydrogen, and hydride affinities of OHn molecules and ions