stablerange: introduce an 'basicstablerange'
This class hold all the basic of stable range but the part specific to the
sorting.
This allow to clearly express what is expected from each method and to generate
tests output to be validated against the more complex implementation.
While writing this, we spotted a bug in the current stable range implementation.
Fix coming.