Go back to using attr_next iterator instead of coroutines...

Reverts most of the changes in commits:

* 786c9c5dfdbdf06c8df1f2ec5ec47a49bf9d9d8c
* 00801de94d3dc74f8af045cbd64e02c9a90215c6