Let ArrayObject implement IteratorAggregate
preliminary implementation of AppendIterator::append()
Check W_AppendIterator state before using it

This is in case a subclass forgets to call the constructor.

Note: it would be easy to correctly initialise subclasses, but that
would be incompatible with PHP.