refactor test structure

The changes included here allow for tests to be run in shadow builds,
as well as by using "make check" rather than the custom run.py script. I've
also added an expected fail for tst_qdjango in the case where an in-memory
database is being used for sqlite (the default case)