"Query tests" for exploring performance changes 

This is a first-pass use of Django's assertNumQueries test for looking for changes in performance (based on # of queries) across branches.

Note that the `persistent_browser` flag needs to be turned off (as state changes in the browser affect the # of queries), so these tests are a bit slow.

I need these tests for another branch, and to examine the develop branch, so will merge straightaway.  @aronasorman if you have time to take a look at the design, let me know if you have questions or feel there may be issues.