Add an exhaustive test for the segment builder. It is only enabled when
-DEXPENSIVE_CHECKS is passed.
The test lists all regions within a window of source code, picks all
combinations of K regions within the window, and runs the segment
builder.
Depends on D36813.
Strictly speaking, it should be something like I < N - R + C.size() + 1, but taking into account the volume of N it doesn't matter.