CA-140974: Only attempt one bind per host at a time

If multiple VMs with vGPUs are starting in parallel, there is the
possibility that one thread will see that a GPU is not yet bound to the
NVIDIA driver while another thread is already attempting to bind the
GPU. The second thread will then also attempt to bind the device, which
will fail with ENODEV.

Moving the mutex to the top level of the bind function means that each
thread will only check the status of a device after any other threads
have finished binding it.

Signed-off-by: John Else <john.else@citrix.com>
Merge pull request #89 from johnelse/ca-140974

CA-140974: Only attempt one bind per host at a time
CP-8987: Deserialise the Xenops record on restore

We want to make sure we're receiving a valid suspend image so, as well as
reading in the right amount of length for the record (checking that the
macro-structure of the suspend image is correct), we should also attempt to
deserialise the Xenops_record to check that it is valid on a deeper level. For
now, we are not doing anything with it but the deserialisation alone checks the
validity.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #90 from simonjbeaumont/migv2-metadata

CP-8987: Deserialise the Xenops record on restore
Add build artifacts to .gitignore

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
Merge pull request #92 from simonjbeaumont/ignorance

Add build artifacts to .gitignore