Solvent effect on the rate of homogeneous and electrochemical electron exchange