Add ConvertRangeToIterator functionality to centralise the extraction of iterators from wrapper functions that convert to ranges. Added unit test too.