[scroll-anchoring] Implement anchor node selection algorithm
<rdar://problem/115583079>
Pull request: https://github.com/WebKit/WebKit/pull/17832
Committed 268348@main (0cd807347378): <https://commits.webkit.org/268348@main> Reviewed commits have been landed. Closing PR #17832 and removing active labels.