Implement canGoForward/canGoBackward.
Pull request: https://github.com/WebKit/WebKit/pull/23578
<rdar://problem/122467621>
Committed 274542@main (1ddf79a30220): <https://commits.webkit.org/274542@main> Reviewed commits have been landed. Closing PR #23578 and removing active labels.