change groupByKeyAndSortValues to return RDD[(K, Iterable[V]) where the values (the iterables) are in-memory arrays