sort-revset: introduce a `random` variant
This new `sort` variant allows to shuffle any revset. It also allow for
randomly picking element using `first`.
tests: remove flakiness in test-nointerrupt.t
The problem was that the reaction to the signal was racing against
the completion of the command.
Since reaction to the signal is to print a line of warning,
we can fix this by waiting for that warning to appear before
allowing the command to complete.