Closure-ify the stable_sort_each_copy kernel.