prototype implementation of generic "for" statment that uses the metamethod __for to implement the loop.