Fix to teachers' survey/review_single view

For historical reasons, we have survey questions (and answers) that anchor
on ClassSections, and we also have some that anchor on ClassSubjects.
When I made the changes addressing ticket #488, I tested only with my own
survey responses, which (because they were from old programs) were
anchored only on ClassSubjects.  As Gurtej found, this still didn't work
if you had survey responses for a more recent program.  This change
collects survey responses anchored to the combination of their previously
taught sections and previously taught classes, so that there is always
something to see when you click on a survey response link.
Fix bugs in dashboard table sorting

Now, when you change the sort mode on the dashboard, the table will be
sorted according to the mode (you don't have to click a column header to
update).

There were also some issues causing Javascript errors in sorttable when
the functions were called at page load, which I've worked around.
Avoid displaying SplashInfo stats headers when module isn't there

My bad, I had missed a tab that was necessary to prevent the SplashInfo
stuff from being included in the JSON stats view if the module wasn't
enabled.
Beef up cache depdendencies for JSON stats view

There are probably more, but this catches the obvious ones: If you change
the program (e.g. add/remove modules), or students edit their info, the
stats will need to be recomputed.
Comment a couple of console.log() lines in Javascript
Initialize json_data in both adminvitals and listclasses templates

This is to avoid Javascript errors (json_data doesn't exist) in the event
that you load the dashboard for a program that has either AdminClass or
AdminVitals modules but not both.