Fix crasher in [[en:Color words]].

RT testing turned up this crasher:
http://parsoid-tests.wikimedia.org/result/048a236c2d438fffe6bfc2ff4b634a7a5076869d/enwiki/Color_words

The `WikiLinkHandler#addLinkAttributesAndGetContent` function should
always return an *array of* tokens, not a single token.  Fix the
DOMFragmentToken case, which didn't meet that contract.

But testing uncovered a bigger issue: local prefixes should only be
added to simple links, not piped links.  Fixing this revealed an
opportunity for a refactor to reduce a bit of common code.

Change-Id: Ic8f2c55093ee8a9e4c392a5b8b93d13b1415268f