Revamp query results caching.

When a query is run and the results are shown, the user can choose to
name the query and save it. Previously, this would save the results in
the database, and was implemented in a very ad-hoc way; a string
representation of the results would be shipped to the results page
in a hidden field to the save-query form. This was lame in many ways.

Now, all queries are cached automatically when they're run.
The idea of saving a query and caching the results are now
separated; saving a query just means giving it a name and having it
appear on the front page. Deleting a query just 'unsaves' it (removes
its name, hiding it from the front page), and the results are still
cached.

The purge_unsaved_queries management command can be used to really
delete all the queries (and the results) that aren't saved.