Move comment from vm state to vm thread.

Should've been moved a while back, but I guess I forgot to.
Static init formatting.
Add vm_state::reset_state.

prepare_unit is not longer responsible for resetting VM state before
loading a unit's data. set_unit instead calls reset_state, which
releases memblocks, callbacks, and so on. This only works for VM states
that have no live VM threads, otherwise it throws an exception without
modifying anything.
FREE 0 no longer an error.

Similar to std::free(nullptr), this is no longer an exception. It's
just been turned into a no-op.
Fix const get_block to check if it actually found anything.

Previously assumed it had a block -- now uses get_block_info and checks
the ok member variable returned to see if it did in fact find anything.
Tweak unused_block_id behavior.

Ensures subsequent calls always return the same ID until said ID is
consumed by the VM.
Add some additional checks to realloc_block_with_flags.

- Checks for size <= 0 and flags == no perms. If either is true, it's
  an error.

- If realloc_block_with_flags is called for a static memory block, that
  is also an error.
Basic doc comments for most of vm_state's methods.