[WIP] Use platform-specific iterators instead

- [x] win32
- [ ] x11
- [ ] cocoa
- [ ] android