Use setImmediate instead of process.nextTick

Similar to d3eec0aba850515daeab6c58432573984f5540e7

Seeing recursive invocation of process.nextTick warnings when tokenizing
large pages. Necessary for mediawiki.tokenizer.peg.js, the others are
just safe changes.

Change-Id: I3595267f191704972901ae86bc6bba86d9c40830
Merge "Use setImmediate instead of process.nextTick"