Introduce the bucket type, implemented the buffered socket reader bucket.
This will provide better abstraction of some code (esp. buffer usage),
and will make it easier to implement gzip encoding (etc.).