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
Tune up report and downtime intervals for l2 agent

If the neutron server erroneously thinks than the l2 agent is down
it will fail to bind a port, which can lead to VM's spawn errors.
However, the issue is only transient because the agent effectively
is only 'late' in reporting back.

Best solution would be an alpha-count algorithm (so that we can detect
persistent failures more reliably), but for now let's be more tolerant
assuming that the agent is down by waiting at least twice the report
interval plus a tiny teeny bit.

Change-Id: I544135ce1f6b7eaefb34ac44af8f5844d92ddd95
Close-bug: #1244255
Merge "Fix DB integrity issues when using postgres"
Merge "Tune up report and downtime intervals for l2 agent"