NVP plugin: Avoid timeouts if creating routers in parallel
There is a well-known issue of eventlet causing deadlocks with
mysql transactions; such condition might occur when
creating NVP routers in parallel.
To avoid this, this patch moves the long-running method
_update_router_gw_info outside of the mysql transaction, adding
the appropriate failure management code, and adds a lock to the
method _nvp_create_ext_gw_port, to ensure serial access to it.
Unit tests for verifying correct behaviour in case of failures
are added as well.
Closes Bug: #
1251847
Change-Id: I2864e2f5bfd3982875ef9df97186f64a9fcaa0e0