Saves the chosen representatives into the index. Copies the rows of
source listed in selected_ids, which must be sorted ascending. Reads
whole chunks and skips any chunk with no selected row.
Picks which items become representatives and returns their ids, sorted ascending.
Number of representatives = total_items / target_cluster_items, rounded up.