Ref T4241. Two changes:
- Use PhutilRope instead of plain string for the Channel write buffers. This makes it more consistent, and should improve performance in some cases.
- Expose information about buffer sizes as public. We need this in a future diff to be able to throttle reads when we're blocked on writes, since we have to be able to test if a write channel is blocked or not.