This ensures that blocks that come from `DispatchWorkItem`s will
function correctly.
The only exception is __dispatch_barrier_sync() as the block passed to
that call is not `@convention(block)` so it doesn't matter.
Fixes SR-2246.
* DispatchTimeInterval's internal interval computation should be
done with signed integers to allow for negative intervals. This
moves all the unsigned conversions out to the API calls that can
only accept positive intervals (timer sources and IO interval) and
allows intermediate TimeIntervals to have a negative value.
* Fix DispatchSourceSignal initialisation such that it no longer
registers for the wrong source type.
* Remove (group:) option from DispatchWorkItem, introduce group
options to `.async` methods that accept DispatchWorkItem.
* Rename `DispatchSourceType` to `DispatchSourceProtocol`
* Rework DispatchQueue attributes and flags into a less confusing
approach.
* Fixes:
SR-1817, SR-1771, SR-1770, SR-1769
<rdar://problem/26725156> <rdar://problem/26873917>
<rdar://problem/26918843> <rdar://problem/26810149>
<rdar://problem/27117023> <rdar://problem/27121422>
<rdar://problem/27236887> <rdar://problem/27337555>