[MRG] Connect only required components in fixing the connectivity matrix

This is the beginning of some minor optimisations as I'm working through the agglomerative code. The previous code in fixing the connectivity matrix, looped through all components to complete the connectivity matrix.

For example, if there are 3 components, it connects, 1 - 0 , 2 - 1, 2 - 0, 3 - 2, 3 - 1, 3 - 0
Is it not sufficient to connect 1 - 0, 2 - 1 and 3 - 2, to make sure all components are connected? Sorry if this PR was out of place.