KokkosKernels: Add segmented sort / sort-and-merge
Created by: mhoemmen
See #660 for a use case. Tpetra::Crs{Graph,Matrix}::fillComplete currently needs segmented sort-and-merge, though a fix for #119 would remove the "-and-merge" requirement.
Thrust doesn't have anything like this. stable_sort_by_key() just does what Tpetra::sort2 currently does, namely apply the implicit permutation resulting from sorting keys, to a corresponding array of values.