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