Speed up ImageBuf Iterators.

In this case, we are concerned especially about the following idiom that
we frequently use to traverse two images simultaneously.
    for (Iterator master(img1), slave(img2); master.valid(); ++master) {
        slave.pos (master.x(), master.y(), master.z());  // synchronize
        // do something with *master and *slave
    }
We repeatedly re-position the slave to the master's position, because there's
no guarantee that two iterators will advance simultaneously with ++ (among
other reasons, that the two images themselves may have different pixel data
windows, and thus different iteration ranges).

Re-positioning the slave on every iteration of the loop was a big time sink.

Improvments in this patch:
1. Have pos() recognize the common special case of incrementing x from
   its last position and still staying in the iteration range, and take a
   big shortcut for that case.
2. Cache the end x position of the tile in the iterator, for quick comparison.
3. Incidentally, migrate operator++ from Iterator and ConstIterator into
   the base class.