Structural, elastic constants, hardness, and optical properties of pyrite-type dinitrides (CN2, SiN2, GeN2)