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
Yeah, I think doing this one way or the other would be better, just not both.  It is confusing right now.