Synchronized with oslo db and db.sqlalchemy

In most cases Oslo-incubator contains the most relevant code.
Furthermore in certain cases exists bugs which can be fixed by
synchronization with Oslo. Thus regular sync is required.

                        Changes from oslo-incubator
==============================================================================
8b2b0b7 Use hacking import_exceptions for gettextutils._
9bc593e Add docstring for exception handlers of session
855644a Removal of _REPOSITORY global variable.
ea6caf9 Remove string.lowercase usage
a33989e Remove eventlet tpool from common db.api
e40903b Database hook enabling traditional mode at MySQL
f2115a0 Replace xrange in for loop with range
c802fa6 SQLAlchemy error patterns improved
1c1f199 Remove unused import
6d0a6c3 Correct invalid docstrings
fb0e86a Use six.moves.configparser instead of ConfigParser
6603e8f Remove sqlalchemy-migrate 0.7.3 patching
97d8cf4 Remove lazy loading of database backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Synced from Oslo-Incubator commit: 517c4cc65969f93b4b758a568725a1625abfd24d

Change-Id: Ida6b38b8e41c73c67170e4ec43943e661f014629
Merge "Synchronized with oslo db and db.sqlalchemy"