Core excitations in MgO: a DFT study with cluster models