Add Extension-level configurability of metadata.

Extensions were taking the parent package's metadata, but this meant
that a package could only contain one extension, which is annoying.
Technically, they could contain more, but each would get the name,
version, etc. of the main package itself.

Now, an Extension can define a metadata dictionary that contains the
information. The keys/values are in the form of standard PyPI package
metadata. This will let us stay consistent in how we represent metadata
across all packages, which will be important later for an extension
store.
Allow TemplateHooks to choose how they want to render contents.

TemplateHooks could previously only supply a template_name, and nothing
else, for rendering. This severely limited them.

Now, rendering is handled in TemplateHook's render_to_string function.
By default, this will simply render the provided template, but an
extension can subclass TemplateHook and override this.

Also, template_name is now an optional parameter.