Problem: need atomic reference counting in several projects

Solution: as libzmq already provides this across all platforms,
expose an atomic counter API. I've not wrapped atomic pointers,
though someone who needs this may want to do so.
Merge pull request #1281 from hintjens/master

Problem: need atomic reference counting in several projects