cpp: compat: Add C++98/boost std::owner_less fallback

The following implementations are supported:

- C++11 std::owner_less
- Boost boost::owner_less (newer Boost versions aligned with C++11)
- Our fallback reimplementation (older Boost versions)