Compensation and defect passivation processes in polycrystalline CdTe: Cl layers