### 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
new TopDocs(
                null,
                new ScoreDoc[] {
                    new ScoreDoc(1, 10.0f, -1), 
                    new ScoreDoc(2, 9.0f, -1),  
                    new ScoreDoc(3, 8.0f, -1),  
                    new ScoreDoc(4, 7.0f, -1),  
                    new ScoreDoc(5, 6.0f, -1),  
                    new ScoreDoc(6, 5.0f, -1),  
                    new ScoreDoc(7, 4.0f, -1),  
                    new ScoreDoc(8, 3.0f, -1),  
                    new ScoreDoc(9, 2.0f, -1),  
                    new ScoreDoc(10, 1.0f, -1), 
                }
            ),
            new TopDocs(
                null,
                new ScoreDoc[] {
                    new ScoreDoc(8, 8.0f, -1),  
                    new ScoreDoc(9, 7.0f, -1),  
                    new ScoreDoc(10, 6.0f, -1), 
                    new ScoreDoc(11, 5.0f, -1), 
                    new ScoreDoc(12, 4.0f, -1), 
                    new ScoreDoc(13, 3.0f, -1), 
                    new ScoreDoc(14, 2.0f, -1), 
                    new ScoreDoc(15, 1.0f, -1), 
                }
            )
        );
        RRFRankShardResult result = context.combine(topDocs);