Made unassigned networks visible in flat networking

This change fixes a bug in Nova's
GET /v2/{tenant_id}/os-networks

The doc
http://docs.openstack.org/api/openstack-compute/2/content/GET_os-networks-v2_ListNetworks__v2__tenant_id__os-networks_ext-os-networks.html
says that "Lists networks that are available to the tenant".

When invoked by a non-admin user it was returning only networks
assigned to the user's tenant.  But in flat and flat DHCP nova
networking, networks CAN NOT be assigned to tenants --- thus a
non-admin user would get zero networks from this operation.

The fix was to make this operation conditionally use an option already
present in the lower-level code to "allow_none" when fetching the list
of networks, meaning to include networks whose project_id field in the
DB held "none" (meaning the network is not assigned to a tenant).  The
condition under which this is done is that the Nova configuration
option named network_manager contains the string
"'nova.network.manager.Flat" --- which is true for flat and flat DHCP
nova networking and false for VLAN nova networking.

Conflicts:
        nova/network/api.py
        nova/tests/network/test_api.py

NOTE(mriedem): The conflicts are due to the objects conversion
in Juno. This cherry pick adds the related network_get_all unit
tests from Juno and makes them work with the DB API in Icehouse.
Also note the oslo.config import in test_api is removed since it
was erroneously merged into master and fixed with commit
0e88148907e1db5218b96e2fa54bf9fee1cba74f but rather than backport
that and squash it with this, I've just removed it.

Change-Id: I64c5a3f31c912cca6b5b9987152ba7a9b3f5987d
Closes-Bug: #1327406
(cherry picked from commit 46e88320e6e6231550f3e2b40312c51f55e059f5)
Merge "Made unassigned networks visible in flat networking" into stable/icehouse