Test: index dump on test failure

This changes adds the ability for a test to create an index dump if a search request fails the test. This can be helpful to be able to analyse the index state after the test has failed
But when will you get a RepositoryMissingException?  One or the other should be sufficient, even if there is no ignore missing?