JAMES-3148 Test and correct metadata cleanup upon failures

Delete the lowest levels of metadata first so that retries eventually
clean up everything.
2 files changed