Factors contributing to distortion energies of bent hydrogen bonds: implications for proton-transfer potentials