Checked consistency between tractrography and dissimilarity

I added a check of the size of the tractography with respect to that of the dissimilarity representation. If there is a mismatch, the dissimilarity is re-computed and re-saved.

Moreover I added a couple of lines so that the cache is saved only when necessary. Previously it was saved every time, which is unnecessary and pretty slow for large tractographies.