Support for SWIG 4.2 and reenable ServiceEndpointRetrieverTest.py (Fixes BUGZ-4144)
Begin arcbot message
This merge request is automatically cherrypicked from !1673 (merged) from source branch https://source.coderefinery.org/ellert/arc/-/tree/swig-4.2 orginally made by @ellert .
The original MR went to branch: https://source.coderefinery.org/nordugrid/arc/-/tree/next
End arcbot message
Patches from https://github.com/swig/swig/issues/2745 by SWIG maintainer.
See commit messages for details.
Fixes: BUGZ-4144