Impact of Mg doping on the optical and electrical properties of p-type CuMnO2 ultrathin nanosheets