Heavy metals leaching out from former mine workings in Cumbria are being removed as part of a £1m pilot project.