On Mavericks, if the value passed to __builtin_clz/ctz is zero, it returns a random result.

Fixed simluator to properly return 32 in these cases, as expected by this architecture.
Tweak behavior of atomic memory transactions

load_sync should always acquire the cache line in the exclusive state
store_sync cannot generate a cache miss.  If the line has been evicted, it should fail.