Fix sqlalchemy 0.8 issues

Use import of exc instead exception.
Mutability tracking is changed in SQLAlchemy 0.8,
but it seems that sqlalchmy.types.MutableType is not needed
in classes Json and Failure from models.

Closes-bug: 1206669

Change-Id: Ib13c2575ead495b22ed5624e68e044e2f4927201
Merge "Fix sqlalchemy 0.8 issues"