Make race detection configurable

Make race detection configurable to facilitate faster local test
iteration using the standard test script. By default, race detection
is enabled.