[2.11..2.13] Support setuptools >= 61.2 in Python tests
Fix for #253 (closed), by mirroring the change from https://github.com/pypa/setuptools/pull/3258/commits/1c23f5e1e4b18b50081cbabb2dea22bf345f5894
On top of that, fix setuptools version detection in buildpath.py. libraries/libapparmor/swig/python/test/buildpath.py: The changes introduced in cc7f5496 targetted a wrong setuptools version (61.2). The change in build directory naming has been introduced with 62.0.
Fixes #259 (closed) Fixes #39 (closed)
The first 3 commits are based on !897 (merged), the other two come from !904 (merged). Since there are several differences between 2.13 and >= 3.0, I had to adjust the patches at several places.
I propose this MR for 2.11, 2.12 and 2.13.