chore: add tracing to primary lockfile functions (#6800)
### Description
Add tracing timings to the functions used when calculating transitive
closures. Didn't go deeper than the two functions that are used by
`transitive_closure` as this is probably all we can do without producing
a wild amount of events. This will at least let us understand from a
profile if parsing is slow or if it's one of the traversal methods.
### Testing Instructions
<img width="1649" alt="Screenshot 2023-12-14 at 4 36 56 PM"
src="https://github.com/vercel/turbo/assets/4131117/c62f3b7d-428a-46a1-b190-4686c112dc59">
Closes TURBO-1937