Try to prevent image indexing test from failing

We need to give elasticsearch time to refresh its indexes, otherwise the
images don't appear in results. This isn't a very nice way of doing it,
but will hopefully be sufficient to get the tests passing.