[xs64bit] CA-141364: Handle errors during domain build

Partial backport of https://github.com/xapi-project/xenopsd/pull/103. Remaining bit backported by https://github.com/xapi-project/xen-api-libs/pull/166