Use Klee's reference counting for garbage collection for IntTRSs

IntTRSs are DAGs. Hence, we can apply reference counting garbage collection to them without any problems. Of course, this does create a little overhead both for the counting and for free'ing.

My apologies for the size of the patch. I refrained from making any functional changes, except in Constraint, where in the case of some of the methods a reference is returned instead of a new identical object being created.