overhaul ARM atomics/tls for performance and compatibility