[Bug 44447] Tokenizer yields to event-loop after every top-level block.

* Currently, the tokenizer parses the whole page at once queueing
  up a lot of async actions in one shot.  This is not so good for
  a few reasons:
  - Tokenized chunks aren't processed further till the whole page
    is parsed.
  - This can lead to the first template requests issues during
    the tokenization to timeout in some cases since the request
    handler might never get scheduled in time.
  - It can result in template requests going out in big bursts
    rather than being spread out over the page parse.

* This patch fixes the tokenizer to yield control back to the
  event loop after every top-level block.  The tokenizer now handles
  this as follows:
  - It schedules a new tokenization event before yielding.
  - It fixes up tsr offsets (on each restart, the source offset
    is zero which would be incorrect relative to the full source).
    The code for this was extracted out of TokenStreamPatcher,
    extended, and moved to mediawiki.Util.js.
  - It records sol state before yielding and restores it on
    resume (by fixing up the sol production).

* The patch also adds a 'fullParse' mode to the tokenizer where
  it does not yield and tokenizes the entire text synchronously.
  This mode is used by the serializer which uses tokenizer
  instances to parse short substrings and assume the tokenization
  to be synchronous.  This is done via processSync call to the
  tokenizer.

* Replaced __parseArgs patch in the mediawiki.pegTokenizer.js
  with a pegArgs object that could have named properties (cb,
  pegTokenizer, srcOffset) and makes the code clearer to follow.

* No change in parser test results from this patch.

* Also verified output on a few pages via 'node server'

Change-Id: Ic82e3048b6f2c0d8d12f45bdd75ec351f770e3cd
Merge "[Bug 44447] Tokenizer yields to event-loop after every top-level block."