See #651514 for details. It's apparently impossible to write code
that avoids both type punning warnings with old g_atomic headers and
assertions in the new. Thus, macros and a version check.
Add an atomic queue. The queue can be used from multiple threads simultaneously
and without taking any locks or doing any blocking operations. This makes it
highly scalable for things like the bus, bufferpools and object recycling.