[ty] Fix unary and comparison operators for TypeVars with union bounds (#22925)
This fixes an issue where comparison and unary operators were
incorrectly flagged as unsupported for TypeVars with union bounds (e.g.,
`bound=float` which becomes `int | float`).
Fixes https://github.com/astral-sh/ty/issues/2652