use autoconf macro to check for pkg-config (closes #15506)

--HG--
branch : 2.7
Issue #23015: Improved testing of the uuid module.

--HG--
branch : 2.7
Issue #22777: Test pickling with all protocols.

--HG--
branch : 2.7
remove extra ssl imports (closes #23053)

Patch from Jan Matejek.

--HG--
branch : 2.7
extra : amend_source : ccf091d5f5039bc1ca00826326c0d78af048b275