Fix DB integrity issues when using postgres

The IntegrityError faced on network deletion that
spooks Tempest tests is most likely caused by the
fact that the ml2 plugin does a dirty read. By
adding a 'select for update' we should be able to
address the issue once and for all.

Also, there's a chance that the dhcp port gets
reallocated while we are deleting the network. To
this aim, catch the integrity error and attempt
to recover from it.

This patch also removes the handling of errors
on concurrent reads that can no longer occur when
deleting the network.

(Hopefully) Closes-bug: #1239637

PS: This fix may be relevant for bugs #1243726 and #1246737

Change-Id: Iefae7fc8a903cc35d8bf80fc4cee533b7f64032c
(cherry picked from commit 54d79acaab50993f08b50f21019f82f17d38caa3)
Lower severity of log trace for DB integrity error

LOG.exception is not appropriate, since a concurrent
port creation can occur and it has been dealt with
in the except block.

This avoids spooking users who are on the hunt for
real bugs.

Supports fix for 1239637

Change-Id: I9489702ee63db0b004fe41195fa4727af261d514
(cherry picked from commit 4c6906498a5ef0f11ada3ff2224e995f6b3062d8)
Merge "Fix DB integrity issues when using postgres" into stable/havana
Merge "Lower severity of log trace for DB integrity error" into stable/havana
Merge branch 'stable/havana' of https://github.com/openstack/quantum into havana/stable