Add beast::asio::basic_streambuf:

This is class whose interface is identical to the `boost::asio::basic_streambuf`, and uses an implementation that stores the data in multiple discontiguous linear buffers, expanding and shrinking as needed. The implementation is complex, with the core algorithm implemented in these functions `prepare`, `commit`, and `consume`. These functions need to be audited line by line for correctness. The Overlay peers are modified to use this new streambuf (its a drop in replacement for `boost::asio::basic_streambuf`). rippled runs connected to the network without assertions or crashes using this code.
Reviewers: @rec @JoelKatz @ximinez

Looking good so far... can you ping me later this afternoon, I'm sure
you'll be fiddling a little more... :-D

On Wed, Oct 29, 2014 at 12:30 PM, Vinnie Falco <notifications@github.com>
wrote:

> In src/beast/beast/asio/streambuf.h:
>
> > +basic_streambuf<Allocator>::const_buffers_type::const_buffers_type (
> > +    typename list_type::const_iterator first,
> > +        typename list_type::const_iterator last, size_type in_pos,
> > +            size_type out_pos)
> > +    : begin_(first)
> > +    , end_(last)
> > +    , in_pos_(in_pos)
> > +    , out_pos_(out_pos)
> > +    { }
> > +
> > +template <class Allocator>
> > +auto
> > +basic_streambuf<Allocator>::const_buffers_type::
> > +    transform::operator() (element const& e) const ->
> > +        value_type
> > +{
>
> Good idea though, I was struggling to figure out how to simplify it and
> this looks good.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ripple/rippled/pull/662/files#r19550932>.
>