Syntheses of metal nitrides, metal carbides and rare-earth metal dioxymonocarbodiimides from metal oxides and dicyandiamide