Theoretical study of the structural, thermodynamic, and electronic properties of a quaternary semiconductor alloy: (Zn, Mg)(S,Se)