partition_factor_cv function

Partition the data for a (non-spatial) k-fold cross-validation at the group level