Influence of Mg Doping on ZnO Nanoparticles for Enhanced Photocatalytic Evaluation and Antibacterial Analysis