Computation of equilibrium oxidation and reduction potentials for reversible and dissociative electron-transfer reactions in solution