Problem: 'bool' is not defined by default

zmq_atomic_counter_dec returned a 'bool' value, yet this isn't
defined by standard, so causes compile errors in upstream code.

Solution: return an int that can be safely converted to bool if
needed by bindings.
Problem: test cases were sporadically failing

Solution: increase settle time for bind/unbind tests
Merge pull request #1282 from hintjens/master

Fixed atomic API, which used 'bool'