Java backend: rewrote the unification algorithm of two CellCollection's to be cleaner