libvirt: make sysinfo serial number configurable

The 'serial' field in guest SMBIOS tables gets populated
based on the libvirt reported UUID of the host hardware.
The rationale is to allow correlation of guests running
on the same host.

Unfortunately some hardware vendors use a subset of the
host UUID as a key for retrieving hardware support
contract information without requiring any authentication.
So exposing the host UUID to the guest is an information
leak for those vendors. It is possible to override the
use of SMBIOS data by libvirt in /etc/libvirt/libvirtd.conf
by setting the 'host_uuid' parameter.

As a way to reduce the configuration burden though, it is
preferrable to use the /etc/machine-id UUID, instead of
the host hardware UUID. The former is a recent standard
for Linux distros introduced by systemd to provide a UUID
that is unique per operating system install. This means
that even containers will see a separate /etc/machine-id
value. This /etc/machine-id can be expected to be widely
available in current and future distros. If missing, it
is still possible to fallback to the libvirt reported
host UUID.

The host UUID exposed could theoretically be leveraged
by a cloud user to get an approximate count of the number
of unique hosts available to them in the cloud by launching
many short lived VMs. Administrators concerned about this
may wish to disable reporting of any sysinfo serial field
at all.

Introduce a 'sysinfo_serial' config parameter to the libvirt
driver to control behaviour, accepting values:

 - 'auto' - try /etc/machine-id, fallback to
   libvirt reported host UUID (new default)
 - 'hardware' - always use libvirt host UUID (old default)
 - 'os' - always use /etc/machine-id, error if missing
 - 'none' - do not report any value to the guest

DocImpact: new libvirt.sysinfo_serial config parameter
SecurityImpact
Closes-bug: #1337349
Change-Id: I7ba7dbd65e913a66efe35a1d6490a85bec8413da
Change error status code for out of quota to be 403 instead of 413

Instead of returning 413 as the error status code when the
request fails due to lack of quota we should return 403

DocImpact: Return 403 Forbidden instead of 413 RequestEntityTooLarge
when a request fails due to lack of quota

Change-Id: I7c179748769b8a0e2cc2e476ebefe33449f6f304
Closes-Bug: 1298131
Merge "Change error status code for out of quota to be 403 instead of 413"
Merge "libvirt: make sysinfo serial number configurable"