Effect of Mg doping on morphology, photocatalytic activity and related biological properties of Zn1−xMgxO nanoparticles