fix transaction management for 1.6 and SQLite
Fix for table invalidation

MultiDbTest.test_basic_queries was failing on my local machine
when run with all the other tests, but passed when run by itself.
It seems like the problem was that QueryCacheBackend.invalidate was
not respecting the "using" kwarg, so it would invalidate the
default table when it was supposed to be invalidating the second table.
Fix errors with leakage around tests

It looks like there are some problems with tests leaking state or cache
entries.  Not sure if I've caught all of them, though.