[ty] Compact reachable binding and declaration histories (#28349)
## Summary
We retain duplicate binding and declaration lists because reachable
histories include implicit unbound/undeclared entries that end-of-scope
histories can discard. We now store those initial entries as one
reachability constraint per place and intern the remaining definitions,
reusing the corresponding end-of-scope declaration list when it matches.