Density functional study of CdS1–xSex and CdS1–xTex alloys