Development of nanostructured alloy-based composite anode materials for lithium- and sodium-ion batteries