Add callback signatures for custom memory allocators.
Merge pull request #22 from glennw/custom-allocator

Add callback signatures for custom memory allocators.