config: move next() and free() into the iterator Like we have in the references iterator, next and free belong in the iterator itself.