Ionization behavior, stoichiometry of association, and accessibility of functional groups in the active layers of reverse osmosis and nanofiltration membranes.