[ty] Remove tracking of whether a whole scope is in a `TYPE_CHECKING` block (#24472)
## Summary
It isn't necessary to store this state on `Scope` anymore: we can just
iterate up through the scope's parent scopes to see if the given range
is contained within any of the ranges those scopes recorded as being
inside `if TYPE_CHECKING` blocks.
I had intended to also remove the `reachability` field from `Scope`: I
think that's also possible, but it's a bit more dubious whether that's a
_good_ change or not, so I'm splitting this out into an independent
cleanup.
## Test Plan
Existing tests