Added operator for saving the distance matrices

The new operator can be find by searching "Segment Mesh". It saves the
distance matrices for the mesh so that any later call of the actual
"Segment Mesh" operator is much faster as the saved matrices can be
used. Also changed weighting with maximum to weighting with the average.