Add new terminal hyperlink tests (#28525)

Part of #28238

This PR refactors `FindHyperlink` handling and associated code in
`terminal.rs` into its own file for improved testability, and adds
tests.

Release Notes:

- N/A
8837e5564dDave Waggoner committed on 6/6/2025, 12:08:20 PM· committed by GitHubparent709523b
4 files changedLine totals unavailable