Added tested implementation of SpinBarrier and CyclicSpinBarrier