sort_dist_mat function

Sorts a distance matrix by rows and columns names