bpo-40050: Fix importlib._bootstrap_external (GH-19135)

Remove two unused imports: _thread and _weakref. Avoid creating a new
winreg builtin module if it's already available in sys.modules.

The winreg module is now stored as "winreg" rather than "_winreg".
3 files changed