Use a local handle to kernel32 DLL.

Using a local handle to the DLL via ctypes.WinDLL('kernel32') will protect
against potential problems caused by changes made by other projects to
ctypes.windll.kernel32.  This also means that local changes via .restype
and .argtypes will not affect others.