Issue #19629: Fix support.rmtree(), use os.lstat() to check if the file is a
directory, not os.path.isdir()
Issue #19811, #22022: test_pathlib uses support.rmtree() instead of
shutil.rmtree() to remove the temporary directory.
Issue #19629: Add missing "import stat"

Sort also imports in support/__init__.py