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