ditest/ditest: make WithTemporaryDB closure return error, handle in api/v0/v0_test