virt: use compute.vm_mode constants and validate vm mode type

Where we have hardcoded vm modes, use compute.vm_mode constants.
Where we get vm modes from external systems, validate them against
the list of acceptable names.

The baremetal/ironic drivers are reporting a bogus vm mode of
'baremetal' for supported instances which is confusing the vm
mode with the Nova driver type. These drivers use the native
ABI for their architecture, so should be reporting 'hvm' as
the vm mode, which indicates an unmodified native OS ABI.

On the other side, the ImagePropertiesFilter will canonicalize
the hvtype it fetches from image metadata, so that 'baremetal'
gets remapped to 'hvm' during comparison.

Closes-bug: #1348629
Change-Id: Ibda7c5ab0759aee672870d84974ccdea25f14407
Merge "virt: use compute.vm_mode constants and validate vm mode type"