Improve stability of SimpleDataNodesTests

Make sure that we are waiting for the new state to be propagated to the node where we are executing the followup query that depends on this state.
Support SpanMultiTerm, closes #2610, #2400

This adds support for lucene span multi term queries. This lucene query
allows users to form complicated queries such as wildcards or prefix
queries embedded within span queries.
Refactoring SpanMultiTermQuery support

* Added license headers where needed
* Refactored SpanMultiTermQueryParser
* Refactored tests to adhere to other tests
Fixed issue where 'fast' should filter can make documents that didn't match the must or must_not clause a match again. Relates to #2979
A neater approach of for processing should clauses before must or must_not clauses.
Accept loopback interfaces in the network.host setting

Closes #2924. Adds support for loopback interfaces such as _lo0_ in network.host and other network settings.