container: inline contains_key default method
iterator: add a `range_inclusive` function

Closes #6242