Remove unused code
Add forum utility code unit test coverage

This is in preparation for significant refactoring of the code in
question.
Remove an unnecessary global

The _DISCUSSIONINFO global was originally used as a cache, but has since
lost that capability and is therefore just harmful. This is a precursor
to more refactoring that will improve the performance of the forums.
Improve performance of forum views

Avoid recomputing course module information for every thread, which
should dramatically improve the performance of high-percentile latency
queries.