Integrating preparation of borides and separation of alkaline- and rare-earth ions through an electrochemical alloying approach in molten salts