Electrolysis of molten carbonates: anodic and cathodic gas-evolving reactions