`DebugInfo`: julia-side internal API improvements (#61979)
The sequel to https://github.com/JuliaLang/julia/pull/61817. We want to
move away from using `getdebugidx`, which has signature
```
(::DebugInfo, pc::Int) -> (line_or_nextpc::Int, edge_id::Int, edge_pc::Int)
```
in debuginfo consumers since (1) there's no good way to return more
information
than a line, and (2) the caller needs to come up with its own criteria
to decide
whether to recurse (`di.linetable !== nothing` will soon be wrong).
TODO: I need to find callers in the ecosystem and move them to this new
API.