core: order of operations when deactivating the last master domain

When deactivating the master domain and there's no other domain to
migrate the master to, the hsms can be disconnected from the pool
only after the spm was stopped to avoid having them being disconnected
from the pool in case that we failed to stop the spm which will cause
them to move to non op as they won't have repoStats on the domains.

Change-Id: I9d9dcf86a7a1f49175435807816a208d4506a7b7
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=921666
Signed-off-by: Liron Aravot <laravot@redhat.com>