Generator and iterator support.

#59 Implementation and iterator support.

The only thing that I would say is missing is proper exit in cases when exception is raised in iterator/ generator.

Currently it stops polling iterator if exception is raised and continues with everything else, and only at the end by checking for exception it will clear memory and return null.

I believe proper behaviour would be stopping right away if exception is raised, but I am not able to implement it.