Common::Flag: Add support for TestAndSet + test by implementing basic spinlocks.
Common::Event: Implement in terms of Common::Flag to get rid of a volatile and optimize with early returns and atomic swaps