Molecular density functional theory: application to solvation and electron-transfer thermodynamics in polar solvents.