[TEST] added sort by "_id" when score is the same to MultiMatchQueryTests#testEquivalence

A merge (and refresh) might rarely happen in the background between the two queries whose output is compared. It might then happen that two docs with same scores get returned by the two queries in a different order due to different lucene document id (which has changed in the meantime). To fix this we need to order by id when the score is the same, so that we can safely compare the output of the two queries (multimatch and dismax).
Moved the updateMappingOnMaster logic into a single place.

Closes #5798
[TEST] _id is not indexed by default, sort on score,_uid in MultiMatchQueryTests
Removed leading spaces on commented config key lines in elasticsearch.yml
Author: Sean Gallagher
Date: 17 Apr 2014 16:18 EDT

Removed spaces on commented lines containing config key entries to prevent
users from inadvertently messing up the indents in elasticsearch.yml.
Closes #5842
[TEST] Make InternalEngineMergeTests more stable
Fail replica shards locally upon failures

When a replication operation (index/delete/update) fails to be executed properly, we fail the replica and allow master to allocate a new copy of it. At the moment, the node hosting the primary shard is responsible of notifying the master of a failed replica. However, if the replica shard is initializing (`POST_RECOVERY` state), we have a racing condition between the failed shard message and moving the shard into the `STARTED` state. If the latter happen first, master will fail to resolve the fail shard message.

This commit builds on #5800 and fails the engine of the replica shard if a replication operation fails. This protects us against the above as the shard will reject the `STARTED` command from master. It also makes us more resilient to other racing conditions in this area.

Closes #5847
Upgrade to mvel 2.2.0.Final
closes #5877
Don't lookup version for auto generated id and create
When a create document is executed, and its an auto generated id (based on UUID), we know that the document will not exists in the index, so there is no need to try and lookup the version from the index.
For many cases, like logging, where ids are auto generated, this can improve the indexing performance, specifically for lightweight documents where analysis is not a big part of the execution.
we need to make sure that we don't do the optimization on recovery
disabling auto generated id should happen on the state the primary operation happened on
we check, before we operate on the replica, if the state has changed, and we need to apply the replica operations to the new state. But, we should make sure we disable the auto generate id on the state the primary operation happened on, since the replica might have gone through recovery, move to started, and then the shard routing will be started in the new state we sample in the replica operation