Ensure that temporary test objects get cleaned up

When we're making temporary DataGroup and DataType objects in the tests,
it's important that we always clean them up after each test.

Otherwise the first failing test will leave them hanging around, then
subsequent tests fail with obscure integrity errors.