Two-dimensional tetragonal transition-metal carbide anodes for non-lithium-ion batteries.