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>
Merge pull request #1085 from akshayramani/SCTX-1283

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