VMware: spawn refactor image fetch/cache

To more cleanly support the various permutations of the following during
spawn():
- different types image to spawn with (sparse, flat, iso,
  and streamOptimized, ova in the futre)
- different ways to obtain the image (http download, and direct
  datastore copy in the future)
- different ways to prepare the downloaded image bits into a usable
  image in the image cache (replace -flat.vmdk extent, convert from
  sparse, pick from imported VM, ...)

The following are introduced:
- Image prepare/fetch/cache functions : these are callbacks for
  processing the bits into a usable form to be cached in the image cache
  under various scenarios.
- Image fetching functions : these are callbacks called by the processor
  to obtain the bits for the hypervisor.

All unit tests should pass unmodified after this refactor.

This should will allow for more self-contained additions/changes
to behaviors in these areas in the future.

Co-authored-by: Radoslav Gerganov <rgerganov@vmware.com>
partial blueprint vmware-spawn-refactor
Change-Id: I8fb46b5a3ef4bb89a6084df955d82821216ebb40
Expose numa_topology to the resource tracker

This patch makes all the current drivers that implement
get_available_resource() return an additional 'numa_topology' field in
the resources dict. The libvirt driver will actually return useful data,
while other drivers only return 'None' at this time.

We also make the resource tracker check for the presence of this field.
The intent is that it be mandatory for all drivers to expose, but to
avoid breaking out of tree virt drivers, if the field is missing it
will be set to None.

Blueprint: virt-driver-numa-placement
Change-Id: I75e4aeea4636532cfd724f718e136fac5bb2d15e
Add pci_requests to instance_extra table

Add a new text column, pci_requests, to the instance_extra table.
This column will be used to hold the data that is currently stored in
instance system_metadata.  The problem with its current location is
the 255 character limit, which becomes a more serious limitation with
the coming SR-IOV support.

Related to blueprint pci-passthrough-sriov

Change-Id: I84d02242c56ad56c597fe588407aaceb24910d0a
Add instance_extra_update_by_uuid() to DB API

Since we have multiple things reading from and writing to the
instance_extra table, we really need a way to just update the value
in a single column, by instance_uuid, without looking it up first,
without wiping the other columns, or updating them with stale data
introducing a race.

This adds the new API, updates instance_create() to pre-create the
extra record, and makes the numa_topology object do this sort of
update instead of creating the record itself. As a result of this
change, we no longer need instance_extra_create() exposed out of
the DB API.

Change-Id: I0819cab81467ab41551e8937be7443a7761cbfb8
Merge "VMware: spawn refactor image fetch/cache"
Merge "Add pci_requests to instance_extra table"
Merge "Add instance_extra_update_by_uuid() to DB API"
Merge "Expose numa_topology to the resource tracker"