Shims and small patches required to get the portable parts of the test suite to run properly, it also includes a fix for spurious failures of dispatch_priority/dispatch_priority2 due to a wraparound bug, which should affect test stability on other platforms as well.