Discovery: Improve the lifecycle management of the join control thread in zen discovery.

Also added:
* Better exception handling in UnicastZenPing#ping and MulticastZenPing#ping
* In the join thread that runs the innerJoinCluster loop, remember the last known exception and throw that when assertions are enabled. We loop until inner join has completed and if continues exceptions are thrown we should fail the test, because the exception shouldn't occur in production (at least not too often).
Applied feedback 3

Closes #8327
Tests: Do not index dummy documents in ExistsMissingTests.

This way we make sure that there is only one mapping for
_field_names.
[TEST] exclude org.elasticsearch.test.test package from test-jar

The package was only excluded during test-jar sources generation but ended up in the actual jar.
[STORE] Remove special file handling from DistributorDirecotry

This commit removes all special file handling from DistributorDirectory
that assigned certain files to the primary directory. This special handling
was added to ensure that files that are written more than once are essentially
overwritten. Yet this implementation is consistent all the time and doesn't need
this special handling for files that are written through this directory. Writes
to the underlying directory not going through the distributor directory are not
and have never been supported.

Note: this commit also fixes the problem of adding directories to the distributor
during restart where the primary can suddenly change and file mappings are by-passed.

Closes #8276
Test: MinimumMasterNodesTests.testCanNotBringClusterDown didn't check for cluster health properly

Also reduced the number of nodes the test uses
Test: ClusterServiceTetsts.testLocalNodeMasterListenerCallbacks should verify cluster state is applied

The test verifies the correct behavior of a listener but we only call the listener after publishing a new cluster state. Only checking on the publishing of the state introduces a racing condition.
[TEST] move NettyTransport*Tests to org.elasticsearch.transport.netty package

NettyTransport*Tests were previously in org.elasticsearch.test.transport and ended up being exported with the test jar. org.elasticsearch.transport.netty should be a better place for them together with exising tests.
[TEST] Fix the throttle test.
[TEST] move ClusterDiscoveryConfiguration to org.elasticsearch.test.discovery

ClusterDiscoveryConfiguration is part of the test infra and should get exported as part of the test jar. This is achieved by moving the class to org.elasticsearch.test.discovery

Closes #8337
Update zen.asciidoc

Tidied up the "No master block" asciidoc
Update cluster.asciidoc

Fixed asciidoc on cluster module page
[TEST] only assert consistency before closing
Catch NoSuchDirectoryException on consistency check - the directory might not be there anymore
Update cluster.asciidoc - fix invalid asciidoc
[TEST] add description of -Dvalidate.skip parameter
geo sort: remove unneded code from geo distance builder

The if statements are unneded and also wrong (second
else if can never be reached).

closes #8338
Switch to murmurhash3 to route documents to shards.

We currently use the djb2 hash function in order to compute the shard a
document should go to. Unfortunately this hash function is not very
sophisticated and you can sometimes hit adversarial cases, such as numeric ids
on 33 shards.

Murmur3 generates hashes with a better distribution, which should avoid the
adversarial cases.

Here are some examples of how 100000 incremental ids are distributed to shards
using either djb2 or murmur3.

5 shards:
Murmur3: [19933, 19964, 19940, 20030, 20133]
DJB:     [20000, 20000, 20000, 20000, 20000]

3 shards:
Murmur3: [33185, 33347, 33468]
DJB:     [30100, 30000, 39900]

33 shards:
Murmur3: [2999, 3096, 2930, 2986, 3070, 3093, 3023, 3052, 3112, 2940, 3036, 2985, 3031, 3048, 3127, 2961, 2901, 3105, 3041, 3130, 3013, 3035, 3031, 3019, 3008, 3022, 3111, 3086, 3016, 2996, 3075, 2945, 2977]
DJB:     [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 900, 900, 900, 900, 1000, 1000, 10000, 10000, 10000, 10000, 9100, 9100, 9100, 9100, 9000, 9000, 0, 0, 0, 0, 0, 0]

Even if djb2 looks ideal in some cases (5 shards), the fact that the
distribution of its hashes has some patterns can raise issues with some shard
counts (eg. 3, or even worse 33).

Some tests have been modified because they relied on implementation details of
the routing hash function.

Close #7954
[TEST] assign a name to the transport client created within ExternalTestCluster

The transport client created within ExternalTestCluster needs a name that follows our naming convention otherwise the thread leak filter barfs when running tests against an external cluster. Used "transport_client_external_{n}" where n gets incremented every time a new external cluster gets created. Updated thread leak filters rules to ignore threads created by such transport client.
Mappings: Generate dynamic mappings for empty strings.

This will help the exists/missing filters behave as expected in presence of
empty strings, as well as when using a default analyzer that would generate
tokens for an empty string (uncommon).

Close #8198
Tests: Temporarily ignore RoutingBackwardCompatibilityUponUpgradeTests.