Cache Program.open_class_category

It wasn't cached, and loading the catalog from a cold cache, for example, calls
it once for every section.
Add tokens to make the catalog invalidate fewer caches

The dependencies were set correctly, but due to #866, the catalog was
invalidating the cached rendering of every single class whenever anyone signed
up for any class.  Now it shouldn't.  This will hopefully save a lot of
computation during student registration.
Merge branch 'catalog-caching' into mit-prod