Fix searchsorted for Ranges

When a is a Range instead of a Vector, searchsorted(a, x, o::Ordering) is computed in constant time, instead of logarithmic time. However, this optimization only works when o is a DirectOrdering, and this restriction was not being enforced.