SpecialPage: DRY array filter for prefixSearchSubpages()

Everytime this gets duplicated it isn't immediately obvious what
all the nested array_slice/preg_quote stuff does. Having it once
place removes the need to figure it out again or look at it as
new code (and ensures they're in sync and saves maintenance).

Change-Id: Iefe340729a55c9bb52a4931310966d0f33041205
(cherry picked from commit 7ae68dcfb9f7a4e8359c1eeba1bed4e81ff1143e)
Merge "SpecialPage: DRY array filter for prefixSearchSubpages()" into wmf/1.24wmf11