Remove race condition (in InstanceTypes)

Soft delete all duplicate rows with the same name except one with
the biggest value in `id` column.

Soft delete all duplicate rows with the same flavorid except one with
the biggest value in `id` column.

Create UC on columns (name, deleted) and (flavorid, deleted)

Replace Select then Insert -> Try to Insert.

blueprint db-enforce-unique-keys

Change-Id: If66d2f1387c2b2748784bf7ac9746b8d755b70a9
Add missing tests for db.instance_type_access_* methods

There was no tests in test_db_api for instance_type_access_* methods.

Add tests to ensure that all works.
Also these tests allow us to refactor these methods.
For example add missing unique constraint on columns
(instance_type_id, project_id)

blueprint db-api-tests

Change-Id: Idfeda1685ef8c812c1211783aede15795b0d7caf
Fix typo in the XML serialization os-services API.

Partially implements blueprint nova-api-samples
fixes bug 1130609

The XML serializer for the update method in the os-services API extensions was
not serializing the "updated_at" field because of a typo in the code.
In this change we added api_samples for the XML output.

Change-Id: I9fff0677e9bad650b19e559b3ed6e9bc0ffe8c3c
xenapi: fix support for iso boot

Fixes bug 1154731 that stated the iso support was broken.

There were several issues around a vdis list without a 'root' disk.

Because the ISO boot was HVM, only 0-3 devices will work, so, the
devices used have been re-ordered to ensure ISOs can be read
by a HVM guest without PV tools. Once PV tools are present, a
HVM guest will be able to access an ephemeral or swap disk.

Change-Id: I4b57f70301a4256fa975323d7964fde19e8d4508
Merge "Remove race condition (in InstanceTypes)"
Merge "Add missing tests for db.instance_type_access_* methods"
Merge "Fix typo in the XML serialization os-services API."
Merge "xenapi: fix support for iso boot"