A simple implementation of a mark-and-sweep garbage collector.