Thermodynamics of the Metal Oxide-Electrolyte Interface Charging