Change ext op API to make JITting them easier.

Now we pass in the memory associated with the current bytecode, so the
JIT will be able to do the same trick.