Since we bumped to python 3.12, setuptools is no longer provided by default: https://docs.python.org/3.12/whatsnew/3.12.html#ensurepip Declare this explicitly.
Also bypass certvalidator's custom test loader using unittest, until this upstream patch makes it into our Guix time machine commit.
Commits split to allow easy reversion of only the imp test loader patch.
Fixes: #36421