Remove Optional[...] special-casing during semantic analysis (#13357)
This is another fix for recursive aliases. Ref #13297
Previously this special casing caused `Optional[...]` to fail with infinite recursion, where `Union[..., None]` worked. I also delete a duplicate helper, and replace it with another existing one that handles type aliases properly.
(I have no idea why some TypeGuard test started passing, but we have `xfail-strict` so I am re-enabling this test.)