More reliable testing of GCD Queues

See https://devforums.apple.com/message/710745\#714753 for a lengthy discussion
define the queue specific key as extern (so it is globally constant)
Merge pull request #1479 from pjrobertson/gcdLocking

More reliable testing of GCD Queues