Convert big iterations in cleanup_update_logs() call to use coiterators.

This should make the whole thing more responsive when having lots of them.