merge revision(s) 43851,43882,43996:

	* ruby_atomic.h: use __atomic builtin functions supported by GCC.
	  __sync family are legacy functions now and it is recommended
	  that new code use the __atomic functions.
	  http://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html

	* configure.in: check existence of __atomic functions.

	* ruby_atomic.h: define ATOMIC_SIZE_CAS() with
	  __atomic_compare_exchange_n() and refactoring.

	* ruby_atomic.h (ATOMIC_PTR_EXCHANGE): atomic exchange function for
	  a generic pointer.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@44952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e