[API] renaming search-template to search_template.

Name of the API should be a valid identifier.
Improved regular scroll api by using IndexSearch#searchAfter instead of regular search methods which rely on `from` for pagination.

This prevents the creation of priority queues of `from + size`, instead the size of the priority queue will always be equal to `size`.

Closes #4940
fix typo joda-time link
[TEST] added missing wait for yellow to indices recovery REST test
Renamed spec search.template.json to search_template.json
to match the name of the method.
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

Closes #5432
[Test] Run after checks even if cluster scope is == TEST
[TEST] Don't use replicas if only primaries are expected or the first shard in the list shoudl be a primary
[TEST] Make SearchWhileRelocatingTests to handle known limitations gracefully
[TEST] Assert search response in MinDocCountTests#testMinDocCountOnTerms
Update to forbidden-apis 1.4.1

Closes #5492
Nodes who are not currently master do not update the ElectMasterService when dynamically setting min_master_nodes

When updating the min_master_nodes setting via the Cluster Settings API, the change is propagated to all nodes. The current master node also updates the ElectMasterService and validates that is still sees enough master eligible nodes and that it's election is still valid. Other master eligible nodes do not go through this validation (good) but also didn't update the ElectMasterService with the new settings. The result is that if the current master goes away, the next election will not be done with the latest setting.

Note - min_master_node set in the elasticsearch.yml file are processed correctly

Closes #5494
[TEST] Disable wildcard query in testFixAOBEIfTopChildrenIsWrappedInMusNotClause for now
[TEST] Add mapping to ensure all nodes / shards parse a numeric field
[TEST] ensure that we don't fail if all shards fail due to no replicas and low number of shards
TransportMasterNodeOperationAction: retry operation if cluster state version changed while adding a ClusterStateListener

TransportMasterNodeOperationAction forwards incoming requests to the currently known master node. If that fails due to a connection error, a cluster state listener will be added in order to try again when a new master is elected. After the listener is in place, a check was made to see if the master has change *while* the listener was being added so that change will not be missed. The check was not enough as it may be that the same master was re-elected (for example, a network hick up) and thus test will fail even though the re-ellection event was missed. In these cases, the request would timeout unjustly. This commit changes this test to be  more strict and retry if the cluster state version changed during the addition of the listener.

Closes #5499
Merge GeoPoint specific mapping properties

Close #5505
[TEST] Fix rounding error problems in FuzzinessTests
Merge null_value for boolean field and remove include_in_all for boolean field in doc

Close #5502
Fix incorrect return impl in SmileXContent.createParser.

Close #5510