Ab initio study of structural, electronic and optical properties of Be-doped CdS, CdSe and CdTe compounds