Electroplating silicon and titanium in molten fluoride media