Initial support for Canonical URLs

This is an initial implementation of canonical URLs. The layout.html bit needs to be fixed so that we support things sanely. I need to figure out a way to hook custom Jinja template filters up through Sphinx, so I can write that logic in Python. It needs to be done in the templating layer because we have to have access to pagename.

Refs #556