Fetch groups once per request

Because the site displays so much content according to group membership,
it's far more efficient to fetch the groups once per request than once
per check on group membership.

Every template now has access to "groups" in its context - a list of
group names.
Reduce queries on highly inefficient views

Some views relied upon inefficient methods of populating the context.
Use aggregation to correct these inefficiencies.

Most views now require ~5 queries in total, having been lowered to O(1)
from O(n). However, a few specialized views (such as the WIMP view)
still require a large number of queries. In the case of the WIMP view,
total queries is still O(n). These cases could be further optimized, but
often at the expense of code clarity. The time required to provide
improvements is also better spent elsewhere. This commit should have the
views optimized well enough.
Implement creator_allowed argument