add MoveItems to RingBuf, fixes  #19085

r? @huonw @csherratt