Stability and Electronic Properties of Rocksalt (CdO)n, (SrO)n, and (BaO)n Nanoparticles