General equation for determining the dissociation constants of polyprotic acids and bases from additive properties. Part I. Theory