Use more smart pointers in NodeIterator.cpp as identified by clang static analyzer.
Pull request: https://github.com/WebKit/WebKit/pull/19129
Pull request: https://github.com/WebKit/WebKit/pull/19150
Committed 269398@main (e859d6e29925): <https://commits.webkit.org/269398@main> Reviewed commits have been landed. Closing PR #19129 and removing active labels.
<rdar://problem/117058869>