Added construction of the UF with global labels.

Added a second constructor to the WeightedUnionFind class that sets the
specified cluster ids at the beginning.
Started to approach the build of the UF for the global labels.