memory: add bson_mem_set_vtable()

This function allows setting a custom memory allocator. It must be called
at the beginning of the process so that allocations are allocated and freed
by the proper system.