Adopt more smart pointers in DocumentWriter.
Pull request: https://github.com/WebKit/WebKit/pull/19797
Committed 270045@main (c0a99308ad00): <https://commits.webkit.org/270045@main> Reviewed commits have been landed. Closing PR #19797 and removing active labels.
<rdar://problem/117784246>