Put __index in the array if the user uses the cursor interface + fix maximum call stack exceed error -- Related to #1578 and #1584
Have the same interface for toArray between cursors and array
Don't reset the stack at the first call of next
Fix tests because of the behavior or setImmediate
Merge branch 'michel_1578_maximum_call_stack' into next