Changed compilation logic of for in statements to use the generator
related protocol for iteration: next and atEnd.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>