Don’t try to remove None when a transaction fails
Stop flushing; just commit

In a number of places in the code, I’ve been flushing the database
transaction rather than committing it.  (The former brings SQLite in
line with SQLAlchemy’s ORM; the latter also sends SQLite a 'COMMIT'
message.)  However, this has caused rather unpleasant error messages –
when transactions get too large, the actual point in the transaction at
which database invariants stop holding is very hard to identify.
Consequently, I’ve eliminated 'flush' from the codebase, replacing it
with more frequent calls to 'commit'.
Have 'static.populate_db' take a session

This should improve the function’s flexibility; it can now be used
inside a transaction.
Schema: Make 'artifact.interpreted' be a 'SMALLINT'

I had it as a 'DECIMAL', but SQLAlchemy doesn’t handle DECIMALs well
when working with SQLite – see, e.g., <https://stackoverflow.com/q/10355767>.
It’s now represented as a 'SMALLINT' instead, which (at least for
SQLite) should be exactly the same.
run: Populate database with static data if it’s found missing
Merge remote-tracking branch 'origin/master'