bpo-38236: Dump path config at first import error (GH-16300) (GH-16332)

Python now dumps path configuration if it fails to import the Python
codecs of the filesystem and stdio encodings.

(cherry picked from commit fcdb027234566c4d506d6d753c7d5638490fb088)
8 files changed