Various win32 test fixes
A collection of fixes, allowing me to pass all the tests on msys2, sometime.
- mainloop still times out
- thread-pool-slow is flaky, test_thread_sort_entry_func() seems borked
A collection of fixes, allowing me to pass all the tests on msys2, sometime.