Revert to C-style callbacks for iteration over allocator chunks.

Also clean up LSan code, fix some comments and replace void* with uptr
to bring down the number of reinterpret_casts.