Nanostructured transition metal nitride composites as energy storage material