Implement MEMDUP and MEMLEN instructions.

MEMDUP duplicates a memory block held by the VM. The new block's size
and contents are necessarily the same as the original block's. The new
block's ID is stored in the output register.

MEMLEN stores the length, in bytes, of a memory block held by the VM
in the output register chosen by the instruction.