Few improvements to diff module

1) Switched to using singletonHeap allocator (should rename this to
internal memory allocator.

2) Start free'ing memory... because we don't have very much of it with
the internal memory allocator.

3) Fix up the singleton heap tests to use a fixture to reset the
allocator after each test. State build up was breaking it from use in
diff tests.
Leverage pointers to write less code

Replace the traceback implementation with pointers so that there is less
code.