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
Merge "Provide "atomic" database access for networks" into stable/folsom
Merge "Ensure allocation pools are deleted from database" into stable/folsom