Effect of CdS Processing Conditions on the Properties of CdS/Si Diodes and CdS/CdTe Thin-Film Solar Cells