Crystal structure, luminescence, and photoelectrochemistry of thin electroplated Cd-chalcogenide layers