[libc++] Fix build failure with _LIBCPP_DEBUG=0 when iterators return values instead of references
There are many STL algorithms (such as lexicographical_compare) that compare
values pointed to by iterators like so:
When building with _LIBCPP_DEBUG=0, comparators are wrapped in __debug_less
which does some additional validation. But __debug_less::operator() takes
non-const references, so if the type of *it1 is int, not int&, then the build
This change adds a const& overload for operator() to fix the build.
Differential Revision: https://reviews.llvm.org/D60592