I believe this takes $\Theta(n^2)$ oracle calls without replacement, and $\Theta(n^2\log n)$ oracle calls with replacement.
Lower bound: Assume my list has a single pair $x[i], x[i+1]$ out of order. Then I can sort if and only if $(i,i+1)$ is chosen as a pair. That means we require $\Omega(n^2)$ iterations in expectation without replacement (simple proof: there's a $1/2$ probability that $(i,i+1)$ is in the last $\binom{n}{2}/2$ pairs we pick) , and $\Omega(n^2\log n)$ iterations with replacement (by classic coupon collector).
Upper bound: The conversation in the comments seems to indicate two versions of the problem. I'll discuss the differences; then solve each below.
In the first, we just get a stream of comparisons; I just keep these comparisons in some data structure for later use (this case is easier as it reduces to the coupon collector's problem directly).
In the second case, you insist that the sorting must be in place, and I cannot keep any extra metadata: when the oracle gives me the order of $x[i]$ and $x[j]$, I must immediately act on that information, and can't store it for later. In fact, one may even limit to the following algorithm:
For $T$ time steps:
- ask the oracle for a random $(i,j)$
- If $i < j$ but $x[i] > x[j]$, then swap $x[i]$ and $x[j]$
This limited case is more difficult, but even for this most restricted algorithm, after $T = O(n^2\log n)$ expected time steps we still sort--even without a black box reduction it essentially becomes a coupon collector problem. Note that I must insist on with replacement here, as otherwise the problem is impossible (if we "unsort" a previously-seen pair this algorithm will never sort it).
The first (simpler) case: After $O(n^2)$ iterations without replacement, or $O(n^2\log n)$ with replacement (via coupon collector), I have compared all pairs with high probability. I'll keep track of all previous comparisons in, say, a DAG, and then I can sort using whatever method I want.
The second case: Each time we swap reduces the number of inversions by at least 1. (Consider a swap of $x[i]$ and $x[j]$ where $x[i] < x[j]$, but $j < i$; swapping $j$ and $i$ reduces the number of inversions by 1. Any element $x[a]$ (with $a\neq i,j$) which has its number of inversions changed must have $j < a < i$. Consider 3 cases for the ordering of $x[a]$ vs $x[i]$ and $x[j]$. If $x[a] < x[i] < x[j]$, or $x[i] < x[j] < x[a]$, the number of inversions $a$ is involved with stays the same. If $x[i] < x[a] < x[j]$, the number of inversions $a$ is involved with decreases by $2$).
If the current number of inversions is $p\binom{n}{2}$, then the probability of choosing a currently-inverted pair--and therefore decreasing the number of inversions--is $p$. So, after $1/p$ iterations, I'm expected to see the number of inversions decrease. Let $X_i$ be the number of iterations until the number of inversions drops to $< i$ from $i$ (we'll let $X_i = 0$ if we never have $i$ inversions), and let $X$ be the total number of iterations done by the algorithm. Then $X = \sum X_i$. Furthermore, $\text{E}[X_i] \leq \binom{n}{2}/i$. So using linearity of expectation:
$$
\text{E}[X] \leq \sum_{i = 1}^{n^2} \text{E}[X_i] \leq \sum_{i=1}^{n^2} \binom{n}{2}/i = O(n^2\log n)
$$
You may notice that this is almost exactly the classic coupon collector problem analysis. The difference here is that we don't always know which coupon we collect (we may even unfix previously-fixed pairs)---but the total number of pairs we invert keeps improving. I would imagine that we can show that $T = O(n^2\log n)$ iterations is sufficient with high probability as well.
Incidentally, this seems like an excellent homework problem for students who have just learned the coupon collector analysis.