### 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/main/java/org/elasticsearch/xpack/rank/rrf/RRFRankCoordinatorContext.java
if (queryCount == -1) {
                
                queryCount = rrfRankShardResult.queryCount;
                for (int qi = 0; qi < queryCount; ++qi) {
                    final int fqi = qi;
                    queues.add(new PriorityQueue<>(windowSize + from) {
                        @Override
                        protected boolean lessThan(RRFRankDoc a, RRFRankDoc b) {
                            float score1 = a.scores[fqi];
                            float score2 = b.scores[fqi];
                            if (score1 != score2) {
                                return score1 < score2;
                            }
                            if (a.shardIndex != b.shardIndex) {
                                return a.shardIndex > b.shardIndex;
                            }
                            return a.doc > b.doc;
                        }
                    });
                }
            }
            assert queryCount == rrfRankShardResult.queryCount;
            
            
            
            for (RRFRankDoc rrfRankDoc : rrfRankShardResult.rrfRankDocs) {
                assert rrfRankDoc.shardIndex == -1;
                rrfRankDoc.shardIndex = querySearchResult.getShardIndex();
                for (int qi = 0; qi < queryCount; ++qi) {
                    if (rrfRankDoc.positions[qi] != NO_RANK) {