SI-7372 fix wrong insertion point for binary & linear search.

It should return the position the value would have if it was a part of
the sequence. Somehow even the test was wrong.
Actually, I was hoping it would (to compensate for `from` being incremented, so that `idx` stayed the same), but, looking at it again, it obviously doesn't half the time. So for example, with this commit, searching a list of 10 elements would start by trying `idx = 5` instead of `idx = 4`, which is plain wrong. It doesn't change the result of the search, but it just isn't the middle. I was lazy and only checked the result, not the math.

To get the same values as before, now that `from` is inclusive, we need to decrement the old definition of `idx`, as in: `idx = from + (to-from-1)/2`, which give exactly the same indices than before (this time I checked). See the fixed commit.