Make class documents show up in catalog preview.

This way, teachers who try to add class documents don't get confused
when said class documents don't show up in the preview.

ClassSubject.objects.catalog is kind of magical and selects a bunch of
related data in one giant query. Our catalog-rendering code assumes
the presence of said data, so wherever we invoke it we should pass it
classes fetched via ClassSubject.objects.catalog.

We could use catalog_cached instead of catalog since correctness of
student counts (if they even appear) isn't important in the catalog
preview. However, the performance hit is tiny since few people even
look at catalog previews--and whatever comes out of render_class_core
*needs* to be correct because that will be cached and reused in the
actual catalog.

(Said observation about caching also implies that student confusion is
a relevant motivation for this fix.)
Make render_class_core depend on qsdmedia.Media.

This is in case teachers upload class documents and then immediately
check the catalog preview to see whether they show up.

Some remarks to the future:

1. This will likely require adjustment when the schema simplification
   project gets merged.

2. Using depend_on_row instead of depend_on_model implies we won't
   catch when a document moves from one class to another. However, I'd
   bet that almost never happens; and I think it's worth not having to
   regenerate the whole catalog every time a teacher uploads a file.

3. This silently fails to empty the right cache if it hits a DataTree
   node with more than one ClassSubject on it. I suspect such DataTree
   errors have enough other symptoms that we can pretend they never
   happen. Also, in a few months, remark 1 will make this irrelevant.
Merge pull request #404 from learning-unlimited/django-1.4-support

Django 1.4 support
Merge pull request #393 from pteromys/stable-jul12-bugfixes

Catalog preview and class documents
Added 'School' Field to onsite reg.

Added 'school' field to onsite student registration as per issue #495.
Field inputs data into 'school' field of studentinfo, but doesn't
fill in 'k12school' field or include the related autocomplete
capabilities. Field is optional.
Removes devserver-specific settings files
Removes custom DB schema change code

This should be unnecessary now, since we use South. If that is not
the case, revert this commit.
Removes devserver specific Python conf
Removes old, unused FastCGI scripts
Removes SVN configuration
Removes old install script
Removes old, unused lighttpd configurations
Removes Gentoo mime types conf
Removes RT configuration
Removes devserver virtual host configs
Removes deprecated get list of students scripts
Removes unuseful script
Removes selenium test for old lottery interface
Removes unuseful script
Removes unuseful script