Normalise the path part of URLs in the text frontend

MediaWiki only purges the canonical encoding of page view URLs, as
defined by wfUrlencode(). But to avoid redirect loops with clients that
automatically encode their paths, it is necessary to serve a 200
response to such requests, rather than 301. So, rewrite those URLs in
vcl_recv, so that the cache entries will be merged.

Tested the normalize_path sub alone in an instance of the stock varnish
from Ubuntu 12.04.

Bug: 27935
Change-Id: I687f677397ca35b5375f9ab764c366b62059e9c8