Use std::atomic values for inter-threads fields of VM.

This pull request solves a long-lived TODO: replacing the `volatile` keyword used for inter-threads fields of VM by C++11 atomic types. The `volatile` keyword had plain wrong semantics for these fields, but seemed to be an acceptable substitute to atomic types at the time of writing that code, since atomic types were not supported by libstdc++ back then.

This pull request must be compiled and tested with clang on a Mac OS before being approved. I'm not sure at all that clang and libc++ support atomic types yet. Although apparently it does, since it passed the "generator" stage, which uses clang.