The discreteness-of-charge effect at charged aqueous interfaces: I. General theory for single adsorbed ion species