Added notion of Rewrite that replaces ScopePhase
Initial parent/child queries cleanup.
Move OrdsBuilding into a dedicated class and abstract integer pools used to build sparse ordinals
- TopChildrenQuery cleanup.
- Added class level jdocs for TopChildrenQuery and ChildrenQuery.
Another small TopChildrenQuery cleanup.
Improve RecoverAfterNodes tests
Improve shardsCleanup test

When startNode exits there is no guarantee that shard cleanup is finished because the cleanup operation is performed on another thread and startNode doesn't wait for it to complete. Therefore we might need to wait for the shard to disappear.
Make facet and sort tests more reliable in case of multiple nodes and shards

Stats, histogram and range facets and sorting currently fail if a field that they are running on is not defined in the mapping. In case of dynamic fields it might mean that by the time the facet query is executed the new field mapping might not be propagated to all nodes yet.
Allow health to be executed on a local node instead of the master
Improve SearchStatsTests

Added refresh to guarantee that at least something will be fetched on a fast computer.
fix getMemorySizeInBytes in SparseMultiArrayOrdinals
check for == 0 rather than > 0
support yaml detection on char sequence
add getMaxOrd, and properly document the difference between it and numOrds
when we fix maxMergeAtOnce, make sure to not set it to 1 as its an illegal value
Add additional query validation to the terms query parser

Fixes #2608
Removed `execution_type` for has_child and has_parent.
Use CacheRecycler when resolving parent docs in TopChildrenQuery.
Made SoftWrapper fields final.
Add proper cleanup to InternalSettingsPerparerTests