SCTX-1283: Fix race condition when a vm-shutdown is inititated during a xapi start-up.

Signed-off-by: Akshay Ramani <akshay.ramani@citrix.com>