opencl.c: opencl_print_kernel_iterators: extract out duplicate print_iterators