Use atomic operations on a few more platforms

Improves performance on 32-bit Windows at least.

Maybe std::atomic works more places, I played it safe.  VS2010 doesn't have it, of course.

-[Unknown]