[PATCH v2 21/40] test: Move dm_test_destroy() into test-main.c