Fix IterO.readline

The old version fails when the source iterator doesn't always emit complete lines.