Sorting and reordering dendrogram nodes.