SERVER-12064 Portability enhancements

The first two commits are of particularly low risk: they should not regress anything, since the new gcc atomic builtins are only used on new architectures not previously supported. In the IA-32 and x86_64 cases, the inline assembly continues to be used.

The benefit of these first two commits is that a build and smoke test on ARM (specifically Ubuntu armhf) now succeeds, provided that you use `--use-system-v8` as the in-tree v8 does not support ARM.

The third commit switches IA-32 and x86_64 to also use the gcc atomic builtins instead of the previous inline assembly, as requested by Andy Schwerin in SERVER-12064. The inline assembly remains and covers the case of a build with an older gcc that does not support atomic builtins. This commit is higher risk, since I change the code path on IA-32 and x86_64, and I think warrants a close review to make sure that my understanding of the required semantics is correct.

For my purposes, I'm fine if you take just the first two commits, since I'll have enabled ARM and hopefully AArch64, too.

However, taking the third commit also is probably a good long term plan for the project.