REORG: channel: move buffer_{replace,insert_line}* to buffer.{c,h}

These functions do not depend on the channel flags anymore thus they're
much better suited to be used on plain buffers. Move them from channel
to buffer.
6 files changed