Add memory function callbacks.

This allows the user of the library to provide own memory functions.
Very useful if the user uses a VM with own memory management or
environments with of implementations of malloc/realloc/free. It avoids the step of serializing between managed VM byte arrays and the unmanaged hoedown buffer because one can now just provide the managed VM byte array to hoedown.

This is the discussion I had while in sundown: https://github.com/vmg/sundown/issues/107