Replace index:iterator() API with Lua-compatible pairs()

This patch converts space:iterator() to be compatible with Lua
for-in loop conventions. The most important change is that
generating function now returns *state* as its first result:

    for _state, val in space.index[0]:pairs() do work(val) end

New syntax follows the best practices of Lua community and makes
index API to be more consistent with pairs() and tuple iterators.

This change partially restores pairs() logic as it was implemented
before 4987561559388c8c5d672d613d17dbf6cd2f890f.