Make Canonizer more flexible

This exposes a few things to configuration via kwargs:

 - how to extract the scheme from the request
 - how to extract the hostname from the request
 - whether the redirect should be permanent
Merge pull request #382 from gratipay/flex-canonize

make Canonizer more flexible