Extraction of magnesium and copper using a surfactant and water in supercritical carbon dioxide