introduce atomic int object
Add atomic API to increment/decrement an integer. Implementation using C++11 atomic with C binding.
Fix #489 (closed)
Note: there were 2 bugs for #489 (closed), one is the concurrent access on _nb_ref, but there is also a missed incref of this counter in statistics_internal_float() and statistics_internal_ushort().