Fix migrations changing the type of deleted column

SQLite doesn't provide a native implementation of BOOLEAN data type.
SQLAlchemy emulates BOOLEAN data type for SQLite using INT column +
CHECK constraint.
We have a few migrations changing the type of column 'deleted' from
BOOLEAN to INT. Due to limitations of ALTER in SQLite, in order to do
that, we omit the original 'deleted' column as well as the corresponding
CHECK constraint when recreating the table. Omitting of the constraint
is more tricky. It's implemented by analyzing the SQL text used for its
rendering. SQLAlchemy versions 0.8.3+ slightly changed the way
constraints are rendered, so we have to update our migrations changing
the type of 'deleted' column to work with SQLAlchemy 0.8.3+ on SQLite
backend (we aren't using SQLite in production, but we still need it for
running of unit tests).

Closes-Bug: #1252693
Change-Id: I52f2b5f90a2f9191767fadc7b1eacae236c30e98
Merge "Fix migrations changing the type of deleted column"
Merge "XenAPI: Use direct IO for writing config drive"
Merge commit 'refs/changes/97/66597/4' of git://gold.eng.hq.xensource.com/git/github/openstack/nova into tmpbranch
Merge commit 'refs/changes/79/69879/3' of git://gold.eng.hq.xensource.com/git/github/openstack/nova into tmpbranch