Electrolytic production, recovery or refining of metals by electrolysis of solutions