Application of electrolytic cells in metals purification and electroplating