Add a new factory function RangeSet::Factory::invert. It performs an inversion operation on the given set and produces a new one as a result. The inversion of the set is a set containing all the values except those which are in the original one.
Example:
original: int8[0, 42] inverse: int8[-128, -1]U[43, 127];
original: int8[-128, 127] inverse: int8[];
original: [] inverse: raise an assertion.
The motivation is to extend the set of operations that can be performed on range sets. Specifically, this function is needed for the next patch in the stack.
Could you please document this function and its complexity? (O(N) where N is the number of elements of the RangeSet.)