phrase_len is not called phrase_length
Allow awareness attributes to be reset via the API

Currently we don't allow resetting the awareness
attribute via the API since it requires at least one
non-empty string to update the setting. This commit
allows resetting this using an empty string.

Closes #3931
Document strict dynamic type mapping.
Fix small typo in terms lookup tests mapping.
Fix small typo in terms lookup tests mapping (count api tests)
[DOCS] Reorganised the highlight_query docs and added a version flag
Clean up wording to reduce confusion

The description of the timeout parameter was worded misleadingly; it implied that the API would wait until the cluster reached the desired level and then stayed at that level for the timeout. I've tweaked the sentence to remove the risk of confusion.
Added facet support to the percolate api.
Closes #3851
Fix markup
externalize writing "raw" fields to helper method
Merge pull request #3940 from rboulton/patch-1

[Docs] Clean up wording in cluster health api doc
Java API: Setting track scores does not affect scan search type
When setting track scores, the scan search type will return the scores for each document. The Java API builder does not properly set this value (it only sets it if a sort in in place, which is not relevant for scan search type).

closes #3949
Add doc values to TermsFacetSearchBenchmark.
Transport: Have a separate channel for recovery
Have a separate channel for recovery, so it won't overflow the "low" channel which is also used for bulk indexing.

Also, rename the channel names to be more descriptive. Change low to bulk (for bulk based operations, currently just bulk indexing), med to reg (for "regular" operations), and high to state (for state based communication). The new channel for recovery will be named recovery, and the ping channel will remain the same.

closes #3954
Fix for has_child can cause an infinite loop (100% CPU) when used in bool query.

Closes #3955
Revert "Fix for has_child can cause an infinite loop (100% CPU) when used in bool query."

Temporarily revert the commit while waiting for the CLA to be signed.
Refactor FieldData iterations

This commit primarily folds [Double|Bytes|Long|GeoPoint]Values.Iter
into [Double|Bytes|Long|GeoPoint]Values. Iterations now don't require
a auxillary class (Iter) but instead driven by native for loops. All
[Double|Bytes|Long|GeoPoint]Values are stateful and provide `setDocId`
and `nextValue` methods to iterate over all values in a document.
This has several advantage:

 * The amout of specialized classes is reduced
 * Iteration is clearly stateful ie. Iters can't be confused to be local.
 * All iterations are size bounded which prevents runtime checks and
   allows JIT optimizations / loop un-rolling and most iterations are
   branch free.
 * Due to the bounded iteration the need for a `hasNext` method call
   is removed.
 * Value iterations feels more native.

This commit also adds consistent documentation and unifies the calcualtion
if SortMode is involved.

This commit also changes the runtime behavior of BytesValues#getValue() such that it
will never return `null` anymore. If a document has no value in a field
this method still returns a `BytesRef` with a `length` of 0. To identify
documents with no values #hasValue() or #setDocument(int) should be used.
The latter should be preferred if the value will be consumed in the case
the document has a value.
Use abstract classes as super typs for Acknowledge operations

Currently we have a marker interface for Acknowledged[Request|Response],
this makes not much sense since we duplicate the code in each subclass
or class that implements the interface. We can simply use abstract
classes and have it implemented only once.
add stop timeout and start mode for windows service.bat

fixes #3938
fixes #3962

(cherry picked from commit f1d6ccc5845ca8f93177c0de3da59a2f37f67818)
add detection of JRE server (JRE on Windows Server)

fixes #3928

(cherry picked from commit a176ffda6fd97b6efbce6cc4f02a824bf5a10a17)