Producing metallic titanium through electro-refining of titanium nitride anode