[ty] Add tests for pydantic validators (#23556)
## Summary
Add some tests that make sure that we understand stacked decorators and
properly infer the first parameter of validator/serializer methods as
being of type `type[Self]`.
See https://github.com/astral-sh/ty/issues/2719#issuecomment-3958798609
for context.