Guard against concurrent port removal in DVR

The delete_csnat_router_interface_ports method constructs
a generator expression to retrieve the ports attached
to a router. If a concurrent process manages to delete
one of the ports referenced in the generator from the DB
after it is constructed (but before iteration), some of the
ports will be None objects on iteration.

This patch verifies that the port db object is there
before trying to extract the ID from it.

More details:

This is because the query expression[1] is evaluated immediately
at the time the generator is defined. If there are ports in the
DB at the time of this evaluation, RouterPort objects will be
prepared to be iterated over. However, before the iteration over the
generator happens, something else may delete the port from the DB.
If that happens, when the iteration starts and the 'port' attribute
is accessed on the router port, a SELECT statement will be issued to
the DB to get that port[2] and it will return None.

1. router.attached_ports.filter_by(port_type=DEVICE_OWNER_DVR_SNAT)
2. The RouterPorts table's relationship to the Ports table is using
   the default 'select' lazy loading.

Closes-Bug: #1381263
Change-Id: Ia371545d641aaa1cbaa0fd10cd233250ec5769e5
Remove single occurrence of lost-exception warning

Returning within a finally block can be surprising since the finally
block will "hijack" the regular return flow.  In this case, pylint is
trying to warn us that the return-within-finally would discard the
earlier caught exception.  For this particular function we don't care
that the exception is lost, so the existing code is correct but possibly
confusing.

Our options are:
1. Disable the lost-exception warning for this function
2. Rewrite the function to avoid return-within-finally

This change takes approach (2), since the required change is trivial.

This change also enables the corresponding pylint check now that the
only offending case has been removed.

Change-Id: If1706851b4bd67ebdbbdb3485984773598efdf7a
Merge "Remove single occurrence of lost-exception warning"
Merge "Guard against concurrent port removal in DVR"
Merge branch 'master' of https://github.com/openstack/quantum