SQLAlchemy 0.8 compatibility

Bug: 989902
Change-Id: I1a7e8949ecd0d8731108a3575a20f261de275b3a
Flask 0.9 compatibility

Change-Id: I41c9f9876024009a9ed2c2c460ac047fbfd01de4
Merge changes I41c9f987,I1a7e8949 into release-0.15

* changes:
  Flask 0.9 compatibility
  SQLAlchemy 0.8 compatibility