This patch adds atomic_load / atomic_store support for different types into intern/atomics.
Originally I used some weird C11/C++11 atomics support to get the compiler to pass, but later Sergey came up with a more generic solution which uses GCC built-in functions, and this is tested to be working as it should.