Carbon materials for metal-ion batteries