[TEST] make sure number of shard is low in network corruption tests
Add java documentation for aggregations

Buckets:
--------

* terms
* range
* global
* filter
* filters
* missing
* nested
* reverse nested
* children
* significant terms
* date range
* ip range
* range
* histogram
* date histogram
* geo distance
* geo hash grid

Metrics:
--------

* min
* max
* sum
* avg
* stats
* extended stats
* value count
* percentiles
* percentile rank
* cardinality
* geo bounds
* top hits
* scripted metric
[TEST] Mute CircuitBreakerServiceTests.testMemoryBreaker

Relates to #8710
[TEST] wait for all shards to be allocated before IndexStatsTests runs
Docs: Fixed bad link to top-hits agg
[TEST] Move NoMergePolicyProvider into it's own class
[TEST] Ensure that all flushes happen on PeerRecovery tests
Fixing typo

Closes #8713
java: QueryBuilders cleanup (add and deprecate)

Some QueryBuilders are missing or have a different naming than the other ones.

This patch is applied to branch 1.x and master (elasticsearch 1.5 and 2.0):

Added
-----

* `templateQuery(...)`
* `commonTermsQuery(...)`
* `queryStringQuery(...)`
* `simpleQueryStringQuery(...)`

Deprecated
----------

* `commonTerms(...)`
* `queryString(...)`
* `simpleQueryString(...)`

(cherry picked from commit 317192b)
[TEST] Ensure we have a mapping for all types on open/close

Conflicts:
	src/test/java/org/elasticsearch/search/basic/SearchWithRandomExceptionsTests.java
bin/elasticsearch: add help, fix endless loop

This change adds command line help for all options to the es start script.
Both '-h' and '--help' options are accepted.

Also, an endless busy loop in the long options parser was fixed: running the
script with a long opt parameter w/o value (e.g. "elasticsearch --buuuurrrnn")
the long option parser would end up in an endless busy loop.

Signed-off-by: Thilo Fromm <github@thilo-fromm.de>

(cherry picked from commit e92ff00)
[TEST] restore gateway.type: local in ClusterDiscoveryConfiguration

None gateway was removed in master hence setting it to local is the default there, applied in #8634 . 1.x still requires setting the geteway type to local explicitly
[TEST] Add gateway tracelogging for BWC
[TEST] disable pattern analyzer for lt_LT as well - know problems
Docs: Update range-query.asciidoc

Closes #8740
Added `inner_hits` feature that allows to include nested hits.

Inner hits allows to embed nested inner objects, children documents or the parent document that contributed to the matching of the returned search hit as inner hits, which would otherwise be hidden.

Closes #8153
Closes #3022
Closes #3152
[RECOVERY] Make recovery delay configurable

Today we wait 500ms before we retry a recovery if the target node is not ready.
This happens if the source starts the recovery before the target has
processed the clusterstate moving the target shard into the right state.
This can cause a 500ms delay each time it happens while the shard is ready
way earlier on the target node. This commit makes this delay configurable
to mainly speed up test processing and shard allocation in tests.