A thread-safety improvement for the GCD channels.

Merged some cherry-picked changes from the main branch.
Cleanup to mirror the cleanup in chan-pthreads

Also changed all the modifications to the blockedWriters and blockedReaders counters to use atomic operations with barriers.
Merge branch 'gcd-channels' of github.com:glessard/swift-channels into master

There is no point in keeping a separate branch for one file.
Having both `chan-pthreads` and `chan-blocks` around will make it easier to evolve both in parallel.