Improve performance of go-to-diagnostic when many diagnostics are present (#23166)

Instead of eagerly calling `to_offset` on the anchor ranges for each
diagnostic in the direction of the search, work lazily in terms of
anchors and convert to offsets at the very end.

Release Notes:

- N/A
74620e611eCole Miller committed on 1/15/2025, 3:02:35 PM· committed by GitHubparent9d3a059
1 file changedLine totals unavailable