Add memory function callbacks.

This allows the user of the library to provide custom memory functions.
Very useful if the user uses a VM with own memory management or
environments with own implementations of malloc/realloc/free. It lets the user avoid 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 about this in sundown: https://github.com/vmg/sundown/issues/107

vmg stopped working on sundown so it never got included.