Liquid-cooled energy storage with lead-acid and lithium batteries