T88290: Only output <ref> contents in <references>
Instead of outputting a <ref>'s HTML in both data-mw and in
<references>, output it only in the later and point to it from
Also preserve data-parsoid for <ref>s text in <references>, as now
that's the only representation of it.
To correctly do html2wt when there are <ref>s inside <references>
we need access to the main document DOM when serializing, so also
ensure that env.page.dom is correctly set (it was only set in v2
Updated tests results and blacklist (some tests now pass).