Introduce `cut` abstraction for IOBuffer

Removes all text between from and to, keeping the position stable with the text. Minor behavior change to kill_line -- when killing just a newline, that goes into the buffer.

Takes the abstraction from #6427 that @carlobaldassi found useful.