Implemented BinarySearch for IList<T> and IReadOnlyList<T>.