Add bounds checking to DEBUG flags.
Explicitly set OMP_NUM_THREADS for tests.
Fix tests so that they can actually fail, and run each test with a serial version.
Simplify and fix the broken test_half_barrier test, and adjust tests to match what will actually pass.