Optimize delete_csnat_router_interface_ports db query
Currently delete_csnat_router_interface_ports provides an iterator as
filter to core_plugin.get_ports which is used in a SQL IN argument.
SQLAlchemy is able to avoid some db queries when the IN argument is
empty BUT not when the argument is an empty iterator and raises the
warning:
SAWarning: The IN-predicate on "ports.id" was invoked with an empty
sequence. This results in a contradiction, which nonetheless can be
expensive to evaluate. Consider alternative strategies for improved
performance.
This change replaces the iterator by a list in order to optimize db
queries when the filter is empty.
Closes-Bug: #
1503852
Change-Id: I4f53433d688dfa020927118a18020b1a6aa55517