Fixes to page-case & querystring canonical URLs.

Because we cache based on the page slug, we need to use {% phased %}
to render the canonical URL tag.  We also want to provide canonical URLs
on '..redirected from' pages, so we want to take into account the
querystring as well.