Implement STL iterators on ObjectArray and add helpers

Iterating over an ObjectArray is rather cumbersome, requiring manual
for-loops. To improve ergonomics and STL standard-ness this implements
std::iterator's for ObjectArray and converts code to use this (in
simple situations). This should allow us to use standard STL functions
in the future when dealing with ObjectArrays.

Also adds some helpers such as ZipCount and ZipLeft.

Test: ./test.py --host
Change-Id: Ifd515b8321775424b3256a6faf47b2ba970177d3
13 files changed