Fix issue, based on find_if, , re #8085

This is now more robust to numerical errors in bin limits, it passes all tests, including
new ones.
RangeUpper: use std::upper_bound rather than find_if, re #8085

upper_bound will be faster if any, and find_if is deprecated
Merge branch 'bugfix/8085_integration_boundaries' into develop