Simplify replace and remove operations on the ChannelPipeline

Introduce extra replace and /remove methods to ChannelPipeline to allow the transfer of remaining messages/bytes in the Buf.  This fix #977 and #858