Adopt more smart pointers in History.cpp.
Pull request: https://github.com/WebKit/WebKit/pull/27975
Committed 278310@main (cde48409003c): <https://commits.webkit.org/278310@main> Reviewed commits have been landed. Closing PR #27975 and removing active labels.
<rdar://problem/127483620>