Bug 50238: Don't entity-escape pipes in extlinks

Slightly more selective application of entity escaping in external links. Not
a perfect solution (and not completely safe), but presumably heavy template
users know what they are doing so breakage should be rare in practice.

Change-Id: I219f5d71d9d4f519aee4a6af8f7fffa9274b1acb
Merge "Bug 50238: Don't entity-escape pipes in extlinks"