Ground- and excited-state properties of M-center oxygen vacancy aggregates in the bulk and surface of MgO