SECURITY: Make Widget replacements more reliable
This makes the marker/replacement functionality more reliable. In
certain cases this improves security. See T149488 for details.
Also store the widget replacements in the ParserOutput instead of
as a static member, so it stays with the correct page. This feels
like it is safer when there are multiple parses going on although
in pracise it should not make a difference.