cosmetic
merge bug25397 into bug25395
include pending_acks in 'fold'
we implement this as a zipper over three iterators
refactor