CA-113570: Handle exceptions thrown by xenguest

Imported from xenopsd.git 63b81aa511a37a685ab108c947fc82aa0ffb7e11

Signed-off-by: Akshay <akshay.ramani@citrix.com>
Imported-by: John Else <john.else@citrix.com>
CA-118130: Allow a domain to write to /local/domain/<domid>/hvmloader

Imported from xenopsd.git 8f66d5f4777dd2c1e82e864c934dfaa76fd91336

Signed-off-by: Akshay Ramani akshay.ramani@citrix.com
Imported-by: John Else <john.else@citrix.com>
CA-114673: Default create-time for a domain is 'now' not 0

Description of the problem from John Else:

The events within xenopsd happen in approximately this order
(n.b. the sender and receiver are different threads in the
same xenopsd, as this is a localhost migration):

 1   Sender makes a request to receiver's receive_memory handler
 2   Receiver creates a new domain into which it will receive
     the memory (including writing the new domain's tree under
     /vm/<uuid>/<domid>)
 3   Sender initiates a save pointing at the fd used by the
     request from step 1
 4   Receiver initiates a restore using the other end of the
     above fd

Problem is, step 3 needs to know which of the two domains to
save, and there's no guarantee that step 3 starts after step 2
is finished. If the xenstore tree hasn't been written yet,
xenopsd defaults to reading the new domain's creation time as
zero, so will always choose it as the old domain to be saved.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
Imported-by: John Else <john.else@citrix.com>
Merge pull request #1691 from johnelse/xenopsd-backports-from-trunk

Xenopsd backports from trunk