Improve regression test added in 8525bfc7.

Refs #422.
Invalidate cached list of panels during tests.
Move a test specific to the profiling panel in its module.
Move a test specific to the template panel in its module.
Normalize the way we write panel tests.
Move two tests specific to the request vars panel in their module.
Fix PEP 8 violations.