bpo-34572: change _pickle unpickling to use import rather than retrieving from sys.modules (GH-9047) (GH-11921)

Fix C implementation of pickle.loads to use importlib's locking mechanisms, and thereby avoid using partially-loaded modules.
(cherry picked from commit 4371c0a9c0848f7a0947d43f26f234842b41efdf)

Co-authored-by: tjb900 <ozburgess@gmail.com>
3 files changed