Allow use of Django debug toolbar with JSON views

Now you can enter some URL from the JSON data module, add
'?json_debug' at the end, and have the debug toolbar show up.
This could be useful for query optimization.
Fix sadfaces, and remove some missing imports

A recent change caused the miniblog to start generating sadfaces,
and this fixes them. I also removed some unused imports that I noticed
while working on #1516.
Modifications to json debug view
Add comment to explain cache error fix
Remove `isinstance(user, AnonymousUser)` checks

Turns out `ESPUser` inherits from `AnonymousUser`, so that doesn't do what one
might think.  Generally replaced by `user.is_anonymous()` which does work
correctly on ESPUsers.  I didn't remove it from `ESPAuthMiddleware` because I
don't understand that well enough to know if I will break something massively.
Also removed an unused function rather than fixing it, and some unused imports
of `AnonymousUser`.
Merge pull request #1518 from learning-unlimited/anonymous-user-fix

Remove `isinstance(user, AnonymousUser)` checks
Merge branch 'main' into fix-imports

Conflicts:
	esp/esp/web/util/main.py
Made pretty-printing work
Merge pull request #1516 from learning-unlimited/debug-toolbar-fun

Allow use of Django debug toolbar with JSON views
Merge pull request #1517 from learning-unlimited/fix-imports

Fix sadfaces, and remove some missing imports
Merge branch 'main' into mit-prod