The main goal of this rewrite is to not use or mess with any global
state.
The ParserGetVariableValueTs and ParserGetVariableValueVarCache hooks
were replaced with setting the timestamp via
ParserOptions::setTimestamp(). This also means that {{#time:...}} from
ParserFunctions extension will correctly use the page's timestamp
instead of the current one.
Disabling tidy is also done using ParserOptions instead of changing
global state.
Change-Id: Ib2810aa5891c57831380a1a4718656cc09932b96