Added a garbage collector with Martin.

Right now it uses a global heap so as to avoid changing all the function
signatures everywhere in the program. It also may not totally work (I
have to look into that).