Nanocrystalline p-layer for a-Si:H p–i–n solar cells and photodiodes