waitForYellow and refresh index bindings, to allow robust testing

I found when testing larger datasets that one second wasn't enough to allow ElasticSearch to catch up.
It was always a dirty hack anyway, so I diked it and had it wait for Yellow, then refresh the index in the tests. This seems to be enough to make it reliably find all the documents it had inserted.