Tools: Add script to grab ES version for BWC tests.

closes #7653
Internal: ClusterHealthAPI does not respect waitForEvents when local flag is set

It uses a cluster state update task and it gets rejected if not run on a master node. We should enable running on non-masters if the local flag is set.

Also, report any unexpected error that may happen during this cluster state update task

Closes #7731
Discovery: not all master election related cluster state update task use Priority.IMMEDIATE

Most notably the elected_as_master task should run as soon as possible. This is an issue as node join request do use `Priority.IMMEDIATE` and can be unjustly rejected.

Closes #7718
[TEST] Use node names for transport clients an close them in tests
[TEST] Fixed ActionNamesTests to not use random action names that conflict with existing ones

ActionNamesTests#testIncomingAction rarely uses a random action name to make sure that actions registered via plugins work properly. In some cases the random action would conflict with existing one (e.g. tv) and make the test fail. Fixed also testOutgoingAction although the probability of conflict there is way lower due to longer action names used from 1.4 on.
[TEST] Make flush in #indexRandom optinal

Some tests like CorruptedTranslogTests rely on the fact that we
are recovering from translog. In those cases we need to prevent
flushes from happening during indexing. This change adds an optional
flag on the #indexRandom utility to disable flushes.
[VERSION] s/V_1_4_0_Beta/V_1_4_0_Beta1/g
[STORE] Fold two hashFile implemenation into one
Discovery: node join requests should be handled at lower priority than master election

When a node is elected as master or receives a join request, we submit a cluster state update task. We should give the node join update task a lower priority than the elect as master to increase the chance it will not be rejected. During master election there is a big chance that these will happen concurrently.

This commit lowers the priority of node joins from IMMEDIATE to URGENT

Closes #7733
Bulk operation can create duplicates on primary relocation
When executing a bulk request, with create index operation and auto generate id, if while the primary is relocating the bulk is executed, and the relocation is done while N items from the bulk have executed, the full shard bulk request will be retried on the new primary. This can create duplicates because the request is not makred as potentially holding conflicts.

This change carries over the response for each item on the request level, and if a conflict is detected on the primary shard, and the response is there (indicating that the request was executed once already), use the mentioned response as the actual response for that bulk shard item.

On top of that, when a primary fails and is retried, the change now marks the request as potentially causing duplicates, so the actual impl will do the extra lookup needed.

This change also fixes a bug in our exception handling on the replica, where if a specific item failed, and its not an exception we can ignore, we should actually cause the shard to fail.

closes #7729
Core: Added live write consistency validation to write apis on top of the cluster state based write consistency check.

Closes #6937
Add Jepsen reproduction test
Increased logging
Added primary shard a document was targeted for in the "indexed document" log
[TEST] Test shouldn't keep state, so moved static variables to a context class holder which each test instantiates.
reset me