Merging RK's changes for transform iterator support for scan and scan_by_key routines.