[TEST] Make sure that a snapshot is completed before trying to modify repository
[TEST] fixed SimpleQueryTests#testMultiMatchQuery check for shard failures

It can happen that not all shards are ready, thus we won't have a total failure, but we do need to check that we have at least a failure. Checked also the message of the failure.
Use patched version of TermsFilter to prevent using wrong cached results

See LUCENE-5502

Closes #5363
Added more logging
Keep track of the exceptions instead of just flagging that an exception has occured.
Blocking writes on a tribe node creates a "blocks" tribe
fixes #5389
Corrected issue with throttle type setting not respected upon updates
[TEST] stabelize SearchStatsTests
Close Directory / Store once all resources have been released

Currently we close the store and therefor the underlying directory
when the engine / shard is closed ie. during relocation etc. We also
just close it while there are still searches going on and/or we are
recovering from it. The recoveries might fail which is ok but searches
etc. will be working like pending fetch phases.

The contract of the Directory doesn't prevent to read from a stream
that was already opened before the Directory was closed but from a
system boundary perspective and from lifecycles that we test it seems
to be the right thing to do to wait until all resources are released.

Additionally it will also help to make sure everything is closed
properly before directories are closed itself.

Note: this commit adds Object#wait & Object@#notify/All to forbidden APIs
MockRepository shouldn't continue read operation after a simulated failure
[TEST] Add random initial index creation without errors to testRandomDirectoryIOExceptions test

If index was originally created without errors we need to check that index is still not broken after trying to refresh with error. However, if index was created with errors we no longer check that it's correct.
More cleanups

Fix assertion to not barf if resources are concurrently released