Ruby 2.3 #bsearch_index method (for usage with older Rubies) Straightforward and non-optimal implementation, just for compatibility