Fix thread handle leak in threadengine_win32