Improve ArrayUtils.binarySearch to return the index of the closest value if several of them are within `tolerance` of the searched value.