add function-y interface for setting halloc allocator

Functions can be easier to export across shared library boundaries on
platforms such as Windows.  This patch adds a simple interface for
setting halloc_allocator.
Merge pull request #19 from froydnj/memory-allocation

add function-y interface for setting halloc's allocator