Garbage Collection and fixes to unary operations

Implemented automated garbage collection for both distributed and local
computations.

Fixed problems with unary operations: memory leaks + invalid
computation of support.