Provide "atomic" database access for networks

Fixes bug 1093637

In the OVS and LB plugins there are cases when accessing the network
has an additional database query. The patch enables this to occur
without accessing an invalid database entry.

Change-Id: I7d4944cf3240819f23dd7b4993d6ae3cefab9dc2
Ensure allocation pools are deleted from database

Fixes bug 1091946

Change-Id: I4330f7a81e4745d5885d58fe7c8a010d18a8e004
Enable tenants to set non-owned ext network as router gateway

Bug 1087243

Avoid loading external networks subnets in tenant's context, as this
might lead to the subnet not being found because it's owned by a
different tenant

Change-Id: Ic4c429c9e667da939ede0aa07a12c0f5a17e212c
quantum-plugin-nicira imports mock but was not used

The import of mock prevents quantum from starting when using the
nvp plugin since mock is not an install dependency. This patch
removes where mock was imported but did not actually need to be.

Fixes bug 1097451

Change-Id: If1569d437fe523e4fac8d686da52b0508ca1cbf3
Correct exception output for subnet deletion when port is used

Fixes bug 1093754

Change-Id: I2deaced0cfc2524234ff79e39e6e7c2f757ff19f
Merge "Provide "atomic" database access for networks" into stable/folsom
Merge "Ensure allocation pools are deleted from database" into stable/folsom
Merge "quantum-plugin-nicira imports mock but was not used" into stable/folsom
Merge "Correct exception output for subnet deletion when port is used" into stable/folsom
Merge "Enable tenants to set non-owned ext network as router gateway" into stable/folsom