cleanup use of sqlalchemy exceptions

The imports aren't used at all and will cause problems with new SqlAlchemy versions as sqlalchemy.exceptions doesn't exist anymore.
Merge pull request #5299 from hufnagel/sqlalchemy-exceptions

cleanup use of sqlalchemy exceptions