Fix framework stats generation for SQLAlchemy 1.1 [#135220913]
Fix framework stats generation for SQLAlchemy 1.1 [#135220913]

 - the `cast` operator on a JSON field no longer implicitly
   call the `astext` modifier (PostgreSQL's `->>` operator) -
   see <http://docs.sqlalchemy.org/en/rel_1_1/changelog/migration_11.html#the-json-cast-operation-now-requires-astext-is-called-explicitly>;
 - in fact, if we're casting to string, `astext` is all we
   need.

alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api