Electrodeposition of magnesium from halide melts—charge transfer and diffusion kinetics