Optimization of the a-SiC p-layer in a-Si:H-based n-i-p Photodiodes