Add _wrap_db_error() support to Session.commit()
Add _wrap_db_error() support to Session.commit()

This patch adds _wrap_db_error() to session.commit(),
which has been observed to be a common point of failure for
deadlock exceptions.   In order to achieve this, the
_wrap_db_error() decorator itself also needed to propagate an
existing DBError, as it is the case that SQLAlchemy's
session.commit() calls into the session.flush() method.
Tests are added to exercise both the nesting of _wrap_db_error()
when a flush() inside commit() raises an exception, as well
as when commit() alone raises an exception that the error
is wrapped as expected.

Tests are omitted here as we are relying upon the tests
that were added to the corresponding oslo-incubator code.

Closes-bug: #1370191
Change-Id: I91510a2b864f0c1b73cfae18f271e94334714dce

leilihh/nova,luogangyi/bcec-nova,leilihh/novaha,leilihh/nova,luogangyi/bcec-nova,leilihh/novaha