Preparation of lithium metal by molten salt electrolysis