Add context argument to host callback functions.
Add vm_state.thread_by_index

Does what it sounds like. Currently lacks error checking, which is a
problem, but for now the main issue is to just get some stuff in there.
Refactor static memory allocation/loading.

Getting blocks now done through get_block_info. get_block is a wrapper
around it with a permissions check.

Allocating a block is now done using realloc_with_flags, allowing the
caller to provide the flags for that block (as in prepare_unit when
loading static memory blocks as individual allocations). This was done
specifically to avoid a write-after-free issue in the unit destructor
where unit memory was still in use when it shouldn't have been.

get_block_info optionally returns a block, so its result should be
checked. If get_block_info returns nothing in get_block, then get_block
now returns nullptr instead of raising an exception for attempting to
access a block that wasn't in _blocks using map.at(K).
Move thread placement into load_thread.

make_thread is just a wrapper around the vm_thread constructor and
passing in a unique_ptr to take ownership of the object.
Add vm_state.destroy_thread(thread_index).

Just deallocates a thread. Nothing special.
Default the vm_unit_t destructor.
Remove default stack size in vm_thread ctor.