Metadata access network: stop at DB when retrieving ports

Issue #16840

The code was issuing a get_ports with elevated context which went
all the way to NVP, causing the process to be very slow, since the
device_id filter cannot be applied to the NVP Query

Change-Id: Ibbb1bf10c98ecd823c6bd13fe7215585c4a8db16
Merge "Metadata access network: stop at DB when retrieving ports"
Ensure appropriate order is set for Nat Rules

Issue #16877

This patch ensures the order for nat rules is always:
255 - match_address_prefix_len
This means that rules for floating IPs will always have order 224 as
the prefix len is 32, where as SNAT rules for subnet will have
order equal to 255 - prefix_len of the subnet's cidr

Change-Id: I9dc0c5cb47b060daf23cef779c70f6e1b6a45e58
Merge "Ensure appropriate order is set for Nat Rules"
Prevent sync routers procedure from hitting NVP

Issue #16840

Grizzly changes brought this code for router synchronization,
which we do not use, into the base db classe we use for our L3
functions. Removing this code would have required a fairly extensive
change. With this patch we are just ensuring these routines
never hit NVP.

Change-Id: I1c207f13f61908ccf8247117880e7d4dbb3eb7a3
Merge "Prevent sync routers procedure from hitting NVP"
Fix 500 raised on disassociate_floatingips when out of sync

Issue: 16886
Change-Id: Icb4ce101d3aded31df1d710711f5cb41e14a692a
Merge "Fix 500 raised on disassociate_floatingips when out of sync"
Cant delete logical entity that is no longer in NVP

For some reason the cascade is not working correctly here unless the
orm.relationship() is added. After adding this I'm able to delete ports
that don't exist in NVP. Though this still seems weird to me.
orm.relationship() is used in several places in the quantum code so it
looks like we were missing it here or ...

Issue: 16839
Change-Id: I3b6884fac13b0a13a779ce9716ee09d8b6e1743b
Merge "Cant delete logical entity that is no longer in NVP"