### Elasticsearch Version

v8.10

RRF produces inconsistent ranking between primary and replica shards when documents from different queries have the same rank.
For example, if: 
doc1 has a rank 1 in the hits set for Query1 (and is not present in the hit set for Query 2)
doc2 has a rank 1 in the hits set for Query2 (and is not present in the hit set for Query 1)

documents doc1 and doc2 could be ranked differently : [doc1, doc2] and [doc2, doc1] depending which shard search will hit.

### Steps to Reproduce

To be provided

### A solution

This happens because for tie breaking, we use internal doc IDs, which is dependant on a shard. Instead we can use an original query ID or order to ensure consistent ordering.

x-pack/plugin/rank-rrf/src/test/java/org/elasticsearch/xpack/rank/rrf/RRFRankContextTests.java
rd11.scores[0] = 3.0f;
        rd11.scores[1] = 8.0f;
        RRFRankDoc rd12 = new RRFRankDoc(2, -1, 2);
        rd12.positions[0] = 3;
        rd12.positions[1] = 1;
        rd12.scores[0] = 2.0f;
        rd12.scores[1] = 7.0f;
        RRFRankDoc rd13 = new RRFRankDoc(3, -1, 2);
        rd13.positions[0] = 0;
        rd13.positions[1] = NO_RANK;
        rd13.scores[0] = 10.0f;
        rd13.scores[1] = 0.0f;
        RRFRankDoc rd14 = new RRFRankDoc(4, -1, 2);
        rd14.positions[0] = 4;
        rd14.positions[1] = 2;
        rd14.scores[0] = 1.0f;
        rd14.scores[1] = 6.0f;
        RRFRankDoc rd15 = new RRFRankDoc(5, -1, 2);
        rd15.positions[0] = 1;
        rd15.positions[1] = NO_RANK;
        rd15.scores[0] = 9.0f;
        rd15.scores[1] = 0.0f;
        qsr0.setRankShardResult(new RRFRankShardResult(2, new RRFRankDoc[] { rd11, rd12, rd13, rd14, rd15 }));
        QuerySearchResult qsr1 = new QuerySearchResult();
        qsr1.setShardIndex(2);
        RRFRankDoc rd21 = new RRFRankDoc(1, -1, 2);
        rd21.positions[0] = 0;
        rd21.positions[1] = 0;
        rd21.scores[0] = 9.5f;
        rd21.scores[1] = 7.5f;