Backport a number of changes from main to the 5.9 release
Windows fixes
explicitly specify the callback calling convention to prevent a miscoompilation
fix a semaphore initialisation issue on Windows
Build Changes
Use an overlay to use the correct modulemap for dispatch that allows us to avoid a build race condition and fix building dispatch with an installed copy of libdispatch
Backport a number of changes from main to the 5.9 release