Fixed usage of LimitIterator
bug #1531 Fixed usage of LimitIterator (grachov)

This PR was squashed before being merged into the 1.16-dev branch (closes #1531).

Discussion
----------

Fixed usage of LimitIterator

When you want to get all items from the start position to the end, for `array_slice` you should pass `null` as the `length` argument, while for `LimitIterator` it should be `-1`.

Commits
-------

f76e67f Fixed usage of LimitIterator