Structural, mechanical and optoelectronic properties of cubic $$\hbox {Be}_{x}\hbox {Mg}_{1-x}\hbox {S}, \hbox {Be}_{x}\hbox {Mg}_{1-x}\hbox {Se}$$ and $$\hbox {Be}_{x}\hbox {Mg}_{1-x}\hbox {Te}$$ semiconductor ternary alloys: a density functional study