Millions of abandoned mines worldwide could help store renewable energy, heat buildings, and support cleaner power grids.