Amorphous carbon-coated TiO2 nanocrystals for improved lithium-ion battery and photocatalytic performance