SortForm fixes

This does the following things:

* Makes this actually work with QueryDicts (did it work before?)
* Extracted out the SortFormBase so that I could use this with django-haystack.
* Made it actually use HeaderSetClass

ping @pipermerriam