Fix data races in state/apiserver tests

SetDebug does nothing unless you set a logger, which we don't.