lib: Enhanced DisjointSet data structure

It is now possible to retrieve the number of subsets in the partition by
using the 'number_of_subsets' property. It is useful for instance when
one wants to know if the partition is a singleton, or if it is trivial
(every element is alone in its subset).

Signed-off-by: Alexandre Blondin Massé <alexandre.blondin.masse@gmail.com>