Adopt more smart pointers in the Document class.
Pull request: https://github.com/WebKit/WebKit/pull/19269
Committed 269557@main (fa36ebb5c3c7): <https://commits.webkit.org/269557@main> Reviewed commits have been landed. Closing PR #19269 and removing active labels.
<rdar://problem/117244404>