Synthesis of early transition metal oxide nanomaterials and their conversion to nitrides