Update prepared statement DB backend for Django 1.4
Update auth middleware for Django 1.4

WARNING: This is a hack to code I don't fully understand yet and it is not
well tested.  Further review is necessary.

Django made some changes to its internal APIs for the authentication
middleware.  This broke our customized authentication middleware.
We had a substantial amount of code replacing the Django auth middleware's
request.user object with an ESPUser.  It looks like Django's new lazy
evaluation class will work here.

We may want to restore the part that tries to set request.user when
Django's get_user function doesn't think anyone is logged in, but the user
ID is stored in the session.  I have no idea why this would happen though.

One other thing I changed is to import ESPUser.  This hasn't broken
anything for me, but I bet there was a reason the previous code tiptoed
around importing ESPUser until it was actually necessary, so I would be
cautious here.
Update cache_inclusion_tag to work with Django 1.4

Django's internal APIs for template tags changed.  This attempts to deal
with that by modeling the cache_inclusion_tag's tag generator on some of
Django's tags.

Appears to work for our QSD and catalog tags, but may be broken elsewhere.
Converts the AdminVitals section of the dashboard to the new-style
management look

This breaks down the AdminVitals sections into related sections, and
puts them in expandable sections, so that they take up less space
initially. This will ultimately load each component of the AdminVitals
individually via AJAX when they are expanded.
Merge branch 'main' into ajaxify_dashboard
Partially ajaxifies the list of classes
Finishes AJAXifying the dashboard AdminClass inline template
Adds in the stats JSON view, which is heavily based on the AdminVital prepare function
Implements an AJAXified AdminVitals module, which uses the stats JSON view
Fixes up the caching on the stats function -- dashboard is now fast
Fixes the 'use_rapid_approval' tag in AdminClass
Fixes a slight bug in the 'use_rapid_approval' Tag checking
Set dashboard styling with rapid approval correctly
Makes a few tweaks to rapid approval.

There was a problem with the popup status not getting updated. I
modified the caching of the class_info function slightly. This
didn't actually fix it, since it turns out the problem was with
browser caching, but the change makes sense to keep in I think.

I also modified wording to be unified (chose "Approved" over
"Accepted" in all locations).
Fix bug where there is an extra slash after the host URL
Use from_here in the teacher bio display.

We ask "If no, what is your school/employer?" on the profile form.
So people just don't put down their school if they checked the
from_here box.

We may want to modify userview.html as well, if it's determined that
we care more about what college they go to than exactly what went in
the "College" box.
Prevent teacherless classes on category change.

Symptom:
Since 7d3d4795243c45cdf5b793f45e4d6e0784aa8064, changing a class's
category through the "editclass" view makes a class lose all its
teachers. Since before then, changing a class's category makes a class
lose all but one teacher.

Cause:
We added teachers back to the class by checking cls.teachers(),
which depends on the anchor, after we modified the anchor. (Before
that, we just added the currently-editing teacher back to the class.)

Solution:
Fetch and remember the set of teachers before modifying the class
anchor.

Remark 1:
Importantly, the occurence of cls.teachers() introduced in
b8a88c914d9ebe1e47abc92d5b46000e661fdf80 is NOT replaced. If it
were, then cls.propose() would not be run on new classes since the
set of existing teachers is empty on a new class.

Remark 2:
Despite lazy evaluation of QuerySets, it seems to be safe to use one
here for the teacher list; calling cls.teachers() seems to get
cls.anchor while constructing the QuerySet, so it doesn't need to
worry about cls.anchor changing out from under it later. This note
remains here in case future magic makes it false.
Merge pull request #377 from pteromys/main

Fixes from Chicago: teacher bios and teacherless classes
Merge branch 'stable-jul12-bugfixes' into main
Merge remote-tracking branch 'origin/django-1.4-support' into main