Mg doping and alloying in Zn3P2 heterojunction solar cells