Fix ctypes.PyDLL construction under Windows
Fix ctypes.PyDLL construction under Windows

We require the ctypes.pythonapi interface but can't use the global one
since we have to change it which could potentially break other users
of that interface.

Turns out simply passing None to PyDLL() only works on Unix to load the
CPython library. Instead copy the logic from the ctypes module in the
stdlib.

https://bugzilla.gnome.org/show_bug.cgi?id=622084

pexip/pygobject,pexip/pygobject,GNOME/pygobject,GNOME/pygobject,pexip/pygobject,GNOME/pygobject