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.

Change-Id: I91510a2b864f0c1b73cfae18f271e94334714dce
Merge "Add _wrap_db_error() support to Session.commit()" into stable/icehouse