Iteration refactor

This merges iternext() and itervalid() into a single iternext() method returning a <yielded value, boolean> pair. It also introduces a iternext_impl() decorator which makes it easier to populate such pair.
Hmm, I'm not sure why we worry about performance of object mode code. What is the use case?