Parse unicode cpu_info as json before using it

If the extra specs are some of this:
- (capabilities:cpu_info:vendor, Intel)
- (capabilities:cpu_info:topology:cores, 2)
- (capabilities:cpu_info:features, <in> rdtscp)

It doesn't work because the cpu_info is loaded as unicode in HostState.
The patch fix these cases by parsing the cpu_info to dict.
Update: use six.string_types instead of unicode.

Change-Id: Ieabf95b1e3e5893ced16c0571c29b13b252df5d1
Closes-Bug: #1331176
Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
Fix ownership checking in get_networks_by_uuid

The code was elevating context before requesting networks which
means that the project_only code is skipped and all networks
could be retrieved. This means that the default networks returned
by FlatDhcpManager could include networks that belong to other
projects.

This fixes the issue by requesting the network without elevating
the context, re-enabling the proper project checking. It includes
tests to verify that the proper exception is raised when an
illegal network is requested and that the context has not been
elevated by the compute manager.

Partially-implements blueprint better-support-for-multiple-networks

Change-Id: Icd3bc521003725cc3da9875dfd6532d5c5524f43
Closes-Bug: 1331092
Merge "Parse unicode cpu_info as json before using it"
Merge "Fix ownership checking in get_networks_by_uuid"