Simplify redirect cookie system

We've already been bitten by discrepancies between JS and PHP, getting rid
of JS as not necessary. Because it was introduced in the first place due to
non-canonical links not being purged, enforce canonicity aggressively, e.g.
/w/index.php?title=foo to /wiki/Foo and /?mobileaction=toggle_view_* to
/wiki/Main_Page. The latter will also reduce the number of HTTP redirects.

Change-Id: I57bcf2f963504d1e4b10779f5bb8a29ebd399bf4
Merge "Simplify redirect cookie system"