Use modular typeshed (unbundle third-party package stubs) (#9973)
Support the new structure of typeshed (python/typeshed#2491) and only
bundle stdlib stubs with mypy.
Most stubs for third-party packages now need to be installed using pip (for
example, `pip install types-requests`). Add stubs for `typing_extensions`
and `mypy_extensions` as mypy dependencies, since these are
needed for basic operation.
Suggest a pip command to run if we encounter known missing stubs.
Add `--install-types` option that installs all missing stub packages. This
can be used as `mypy --install-types` to install missing stub packages from
the previous mypy run (no need to provide a full mypy command line).
This also replaces the typeshed git submodule with a partial copy of the
typeshed that only includes stdlib stubs.
Add a script to sync stubs from typeshed (`misc/sync-typeshed.py`).
This is still incomplete since typeshed hasn't actually migrated to the new
structure yet.
Work towards #9971.