### 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
assertEquals(2, result.queryCount);
        assertEquals(10, result.rrfRankDocs.length);
        RRFRankDoc expected = new RRFRankDoc(8, -1, 2);
        expected.rank = 1;
        expected.positions[0] = 7;
        expected.positions[1] = 0;
        expected.scores[0] = 3.0f;
        expected.scores[1] = 8.0f;
        expected.score = Float.NaN;
        assertRDEquals(expected, result.rrfRankDocs[0]);
        expected = new RRFRankDoc(1, -1, 2);
        expected.rank = 2;
        expected.positions[0] = 0;
        expected.positions[1] = NO_RANK;
        expected.scores[0] = 10.0f;
        expected.scores[1] = 0.0f;
        expected.score = Float.NaN;
        assertRDEquals(expected, result.rrfRankDocs[1]);
        expected = new RRFRankDoc(9, -1, 2);
        expected.rank = 3;
        expected.positions[0] = 8;
        expected.positions[1] = 1;
        expected.scores[0] = 2.0f;
        expected.scores[1] = 7.0f;
        expected.score = Float.NaN;
        assertRDEquals(expected, result.rrfRankDocs[2]);
        expected = new RRFRankDoc(10, -1, 2);
        expected.rank = 4;
        expected.positions[0] = 9;
        expected.positions[1] = 2;