Move array iterator polyfill to its own module

This is based on the V8 implementation which was originallyu done by
yours truly.