range: Fix SFINAE rule for picking the best do_lower_bound()/do_upper_bound() overload
range: Fix SFINAE rule for picking the best do_lower_bound()/do_upper_bound() overload

mutation_partition has a slicing constructor which is supposed to copy
only the rows from the query range. The rows are located using
nonwrapping_range::lower_bound() and
nonwrapping_range::lower_bound(). Those two have two different
implementations chosen with SFINAE. One is using std::lower_bound(),
and one is using container's built in lower_bound() should it
exist. We're using intrusive tree in mutation_partition, so
container's lower_bound() is preferred. It's O(log N) whereas
std::lower_bound() is O(N), because tree's iterator is not random
access.

However, the current rule for picking container's lower_bound() never
triggers, because lower_bound() has two overloads in the container:

  ./range.hh:618:14: error: decltype cannot resolve address of overloaded function
              typename = decltype(&std::remove_reference<Range>::type::upper_bound)>
              ^~~~~~~~

As a result, the overload which uses std::lower_bound() is used.

Spotted when running perf_fast_forward with wide partition limit in
cache lifted off. It's so slow that I timeouted waiting for the result
(> 16 min).

Fixes #2395.

Message-Id: <e737d98a6818075572e75e6d47bea9682f4a40ef@scylladb.com>

scylladb/scylla,scylladb/scylla,duarten/scylla,avikivity/scylla,avikivity/scylla,avikivity/scylla,duarten/scylla,scylladb/scylla,duarten/scylla,scylladb/scylla