[PATCH v3 22/41] test: Move dm_test_destroy() into test-main.c