Switch to new format for settings.CACHES

This should prevent warnings from being displayed whenever the code is
imported.
Tweak to scheduling check module

Uses the memoized _all_class_sections() function in
SchedulingCheckRunner.incompletely_scheduled_classes().
Fix TemplateOverride.save() bug

The code was assuming that the Django internal variable
template_source_loaders had been initialized (in order to clear any Django
template caches).  This is not always the case, leading to an error
(sometimes on a live site, always from the shell) when saving a template
override.  Checking whether the variable is a list fixes the problem.