GH-116380: Revert move of pathlib globbing code to `pathlib._glob` (#118678)

The previous change made the `glob` module slower to import, because it
imported `pathlib._glob` and hence the rest of `pathlib`.

Reverts a40f557d7b7a355a55bb90c068e3e9202fd9c8f2.
4 files changed