Removing rpc communication from db transaction

In a transaction context of ExtraRoute_db_mixin.update_router() was
called super method that uses subtransaction and communication with l3
agent. In case of agent's heartbeat happens while there is running
transaction, update heartbeat in agents table gets stuck in a deadlock.

Closes-Bug: #1211915
Change-Id: I96e6a9d7172d5a0e3e720a81fcd10f04c40aef07
(cherry picked from commit 5becbbec6a686667925f399904cebd97b583c35a)
nvp:log only in rm router iface if port not found

The code currently raises when it's not able to find the port to be
deleted on the backend. This might happen, for instance, when the
port is manually removed or, in some cases, if port creation failed
in the first place.

There's little sense in raising when a resource to be removed is not
found; therefore this patch replaces the raise statement with a log
statement.

Bug 1240720

Change-Id: Ifa756b07ef41346a44325341c8e0e8994dc64dde
(cherry picked from commit 477dac0373b5e84c71365d7a71b9cc41aafcb491)
Fix access to lifetime dict in update_ipsecpolicy method

Also add corresponding unit test.

Change-Id: Ie1141b5034415ccf3039a71dfedc47cfb2ca7a88
Closes-Bug: #1237912
(cherry picked from commit 48e36b542904effb9b35c9d62bd0247e25f0dac6)
Fix error while creating l2 gateway services in nvp

Ensure that Conflict errors are not masked; also ensure
that coding errors do not mask NVP API errors.

Fixes bug #1244259

Change-Id: I27586d72af89fd39f6443dbab33f0e4e762b0c99
(cherry picked from commit 94950eeb22c95da6b2115ea99f6131700decaa09)
fix nvp version validation for distributed router creation

Fix typo on major version. This was not caught during unit tests
so adds a few to ensure this does not regress.

Fix bug #1243862

Change-Id: Ie136aaa504939d8ac77dda07e3f955aed8c233f9
(cherry picked from commit 9eb06332f0292ed4db7b322e483167cb40740d6e)
Merge "nvp:log only in rm router iface if port not found" into stable/havana
Merge "Fix error while creating l2 gateway services in nvp" into stable/havana
Merge "fix nvp version validation for distributed router creation" into stable/havana
Merge remote-tracking branch 'origin/stable/havana' into havana-nec