Performance - Merge DSJ-REL-UNIQcand-DLRnodes into ONE function
DLRnodes and UNIQcand algorithms perform the same linear scan over the multitree. DSJ and REL perform a quadratic scan.
Current: O(n)+O(n)+O(n)^2+O(n)^2
These 4 functions can be merged into one in order to dramatically improve the performance.
Expected: O(n)^2