Subpage link fixes

More thorough test cases for subpage links, based on the examples at
https://en.wikipedia.org/wiki/Help:Link#Subpage_links

The tests show three errors, in our handling of [[../../]] (where the link
text was wrong), [[../Sibling/]] (a spurious trailing slash) and
[[../../../]] (which shouldn't be a link if it goes up past the root).

This also exposes an inconsistency in how trailing slashes are handled,
which I've fixed on the PHP side in change
Id61eacafea9820c404699a7902c8eb8102779516.  (Note that this involved
a change in the PHP parser, so the parsoidsvc-php-parsertests test
won't pass until this is merged into mediawiki/core.)

Changes to parser tests are documented to be correct by inclusion of
corresponding html/php results.

Change-Id: Id5eedd39900bf6afe5ecc26f9ad7e31aaaadf70f
Merge "Subpage link fixes"