Density functional study of structural and electronic properties of cube-like MgO clusters