Insights into the formation of metal carbon nanocomposites for energy storage using hybrid NiFe layered double hydroxides as precursors