SANIBEL: SCTX-1283: Fix race condition when a vm-shutdown is initiated during xapi-startup 

If a shutdown in initiated when xapi is starting up , dbsyc_slave.ml will mark the domain as running AFTER the clean shutdown. Hence the VM is marked as running and resident_on is marked as null.

This commit ensures it checks that the domain is not in a shutdown state before marking it as running.