Implement typing `Literal` support
After #1640 stops the crashes, we'll have to add real Literal support. This involves:
- Adding a new class PythonLiteral and adding it to the typing module.
- Modify the
SpecificTypeConstructordelegate type to accept IMembers instead of IPythonTypes, since we now need to be able to have non-types. - Potentially undo some of #1631, since
Nonewould be a valid non-type and could be passed through, allowingNoneTypeto return withNoneas its sole instance.
Related to #535, but this is a more specific case.
This is probably going to require some hefty changes to the TypeAnnotation stuff, since right now if a constant string is seen, we assume that it's supposed to be another type and parse it, but if it's a literal, we don't want to do that. (Maybe we shouldn't be doing that at all past a top level annotation being a string; need to read the spec.)
That and TypeAnnotation also relies on annotations be solely constructed with IPythonType.
FWIW the new LS we released today has full typing support: https://devblogs.microsoft.com/python/announcing-pylance-fast-feature-rich-language-support-for-python-in-visual-studio-code/