[ty] Allow stringified argument in PEP 613 alias to `Optional` (#23200)
## Summary
The argument of `Optional[…]` in value position was previously inferred
as a value expression, but there is no need for that. We know that the
argument is always a type expression. This change allows us to handle
stringified arguments correctly. We already do the same for similar
special forms like `typing.Union`.
closes https://github.com/astral-sh/ty/issues/2770
## Test Plan
Added regression test and some related additional tests.