Add memory leak tracing

Tracing memory leaks won't hurt in the autotest either.