Bottom-up in situ formation of Fe3O4 nanocrystals in a porous carbon foam for lithium-ion battery anodes