Merge pull request #1101 from Kijewski/issue-979-2

ringbuffer: versatility and optimizations
Add generic `char` pipe implementation