Avoid using document.write
document.write was stubbed in Ic9056d7a779f234a28ddad005fd4d76f2e750fcc and
has a slightly different behaviour now (it now appends the given parameters
to the body directly, instead of adding it to the position where the call
was made). This seems to be a race condition with the usage of document.write
in DismissableSiteNotice to add the site notice with JS for anonymous users and
sometimes results in an undesired outcome.
Instead of having this problem, this change replaces the usage of document.write
writing something to the output, only.
This probably fixes T125323.