Switch to using QAtomicInc instead of "volatile" flags in more places.