Electronic, lattice vibration and mechanical properties of CdTe, ZnTe, MnTe, MgTe, HgTe and their ternary alloys