Preparation and optical properties of group IV–VI2 chalcogenides having the CdI2 structure