The waste left over from spent fossil fuel may contain a treasure trove of rare-earth elements worth billions of dollars.