Millions of abandoned fossil fuel wells could be refitted to provide clean, low-carbon geothermal energy.