Fixed an error in mlg.filter and mlg_clustering.c

Both of these functions should now work correctly for each algorithm type.
Due to the arbitrary selection of which node survives a merger, these can be nondeterministic in the presence of ties.