Put parser cache js config fallback in MakeGlobalVariablesScript hook handler

If we need to do fallback, then we need OutputPage::getRevisionId which
returns null when called in OutputPageBeforeHTML (which occurs during
OutputPage::addParserOutput).

addParserOutput is called in Article, just before OutputPage::setRevisionId
gets called by Article.

When MakeGlobalVariablesScript is called, output page has revision id set.

Change-Id: Ideb2a4dbf8228f3163d3432157894fabd4760c20
(cherry picked from commit d9ae8e66ba1fe54d537441b0ee7079851d194751)