There are duplicate sets of Layout DOM wrappers: one for Layout 2013 and
one for Layout 2020. As part of cleaning up and simplifying the
wrappers, this change parameterizes them on the specific layout data
they contain. This allows them to be shared again. In addition, various
small cleanups are included.
Fixes#29691.
Ideally we want to be able to borrow from the DOM during box construction
but that's not playing very well at the moment with the current bridge
between script and layout.