smalloc: initial smart memory allocator

Other classes that require external memory should allocate it though
smalloc. This will automatically handle pooling and cleanup. Also by
centralizing how external memory is handled it will be easier to make
performance adjustments.
smalloc: implement HeapProfiler

To properly report the use of external memory each Persistent must be
hooked into the HeapProfiler.