Allow static media bundles to apply to certain URLs.

We previously only had one special type of static media bundle: "default".
This would appear on all pages. Extensions wanting finer page control
would have to use a TemplateHook with a set of URL names and a template
for loading the bundles, which was annoying and inefficient.

Now, static bundles can have an "apply_to" field containing a list of
URL names. When rendering default static bundles for a page, all bundles
matching that page's URL name will be included.
Simplify TemplateHook and create a mixin for applies_to functionality.

TemplateHook did some hard work in order to figure out the URL name to
match for applies_to. Turns out that Django provides the URL name for
us, through request.resolver_match.url_name. Since this is more
reliable, we can use this directly.

The applies_to support is pretty handy, and even though it's now
simpler, it's best not to have to re-implement it. This change pulls it
out into a mixin that can be easily used by other hooks.