Sync common db and db.sqlalchemy code from Oslo

Patch contains common code from Oslo for work with database:
work around session, connection, engines, models, migrations
and another utils for work with DB.

We should use this code instead of Glance implementation.

blueprint use-oslo-common-db-code

Change-Id: I7d2bd32db7265f06efd10f5071e3426c6e10a348