[ty] Assign lower completions ranking to deprecated functions and classes (#23089)
## Summary
This makes the completion rank deprecated functions and classes lower
than non deprecated ones. It relies on the `@deprecated` decorator on
the definition.
I'm new to this subsystem. Let me know if something should be done
differently.
Fixes https://github.com/astral-sh/ty/issues/2654
## Test Plan
Added completion eval test.