straightforward couchdb iterator implementation
First implementation