This makes in particular rand no longer a testing dependency.
We keep a seedable random generator on the PartialDiscovery object
itself, to avoid lengthy initialization.
In take_quick_sample() itself, we had to avoid keeping the reference
to self.undecided to cope with the mutable reference introduced
by the the call to limit_sample, but it's still manageable without
resorting to inner mutability.
Sampling being prone to be improved in the mid-term future, testing
is minimal, amounting to checking which code path got executed.
You can do
And avoid the insert below. Alternatively use the entry API which may be a bit more readable.