Use processToplevelDoc to process src for /_wikitext/ endpoint

* Fixes bug with cite ref indexes not being reset.

Change-Id: Id169f22bed4c1c8060406ff20607af72a83e7c81