Import sql_connection option before using it.

This change fixes issues that would arise when testing certain files on
their own. Normal test runs were not affected due to serendipity in the
implied import order.

Change-Id: I9a85bf0112a9796482624e860efc2ec620aaf0f2
Do not raise NEW exceptions

Raising NEW exception is bad practice, because we lose TraceBack.
So all places like:

except SomeException as e:
    raise e

should be replaced by

except SomeException:
    raise

If we are doing some other actions before reraising we should
store information about exception then do all actions and then
reraise it. This is caused by eventlet bug. It lost information
about exception if it switch threads.

fixes bug 1191730

Change-Id: I047e355607318bf9fa6208c2b174b7cc394297f0
Merge "Do not raise NEW exceptions"
Merge "Import sql_connection option before using it."