utils: extend binary-search to return the first/last index
binary-search can find an index of a matching entry in a sorted list. However, if the list contains multiple entries that compare equal, it can be interesting to find the first/last entry. For example, if you want to append new items after the last. Extend binary search to optionally continue the binary search to determine the range that compares equal.
Showing with 167 additions and 24 deletions