Fix python3.x scoping issues with removed 'de' variable

In python3.x the 'de' variable will be removed from the
scope after the except block exits (if it ever is entered)
so we need to use a different variable name to ensure that
it will not be deleted so we can use it later.

This avoids errors of the format:

UnboundLocalError: local variable 'de' referenced before
                   assignment

Change-Id: I9ea2bd6b3a8c392f8d27b0130dd6b7683fc44e7c
Ensure is_backend_avail() doesn't leave open connections

is_backend_avail() helper function calls _ensure_backenv_available()
method,which creates a SQLAlchemy engine and opens a test connection,
but doesn't call engine.dispose(). Depending on Python interpreter
version used, the connection in the pool may remain open for some
time (even though, we don't store a reference to an Engine instance).

Closes-Bug: #1393633

Co-Authored-By: Victor Sergeyev <vsergeyev@mirantis.com>
Change-Id: I0297af709ed18fed52308500c13054cb49adf401
Merge "Ensure is_backend_avail() doesn't leave open connections"
Merge "Fix python3.x scoping issues with removed 'de' variable"