[ty] Infer type of implicit `cls` parameter in method bodies (#21685)
## Summary
Extends https://github.com/astral-sh/ruff/pull/20922 to infer
unannotated `cls` parameters as `type[Self]` in method bodies.
Part of https://github.com/astral-sh/ty/issues/159.