Moved CloseHandle code to corresponding CreateXXX modules.