The optimization of functional layers of solar cells based on n-ZnMgO / p-CuO and n-ZnMgO / p-Cu2O heterojunctions