[ty] Avoid repeated subtyping checks for materialized recursive protocols (#28774)
Extends the recursive protocol shortcut added in
https://github.com/astral-sh/ruff/pull/28079 to support subtyping. This
resolves a hang introduced by
https://github.com/astral-sh/ruff/pull/28657, which changes the
constraint solver to use subtyping instead of assignability when
deriving transitive bounds.