Fixed the TODO in SpinLock, and LockTable - grab new atomic_flag before releasing tableLock