GH-117727: Speed up `pathlib.Path.iterdir()` by using `os.scandir()` (#117728)

Replace use of `os.listdir()` with `os.scandir()`. Forgo setting `_drv`,
`_root` and `_tail_cached`, as these usually aren't needed. Use
`os.DirEntry.path` to set `_str`.
2 files changed