Activity-based analysis of potentiometric pH titrations.