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.
Merge branch 'gurtej_fixes' of github.com:learning-unlimited/ESP-Website into gurtej_fixes
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
Fixes a minor Javascript bug in registration
Allows adding or removing yourself from the class teachers in AdminClass
Makes the lottery interface fail gracefully in the case JSON data doesn't load
Creates the default resource types when a program is created
Fixes the restype of floating resources
Fixes ResourceTypes showing up for class registration

Now all even if static_resource_types is set, all available
ResourceTypes for the program are shown. If use_global_restypes is
set, then global ResourceTypes are also shown. I believe this is
the correct behavior, but someone should sanity check this.