Fix GC bug in for loops

The native for-do method did not save a stack reference to the object it
received from the iterator, meaning it could be freed if a GC run were
triggered by the allocation of the stack frame inside the block body.
This commit ensures that the argument object cannot be freed until it is
no longer in use.