Performance: Avoid excessive buffer copying on large values

Rows with large (>64k) values would be accumulated by repeatedly concatenating
a new chunk with the entire buffered value received so far. In benchmarks with
a 3mb value and a REST front-end this led to buffer copying being responsible
for about 56% of all CPU time.

This patch avoids this issue by recording how many bytes are expected for the
next cell, and then accumulating all buffers in an array until enough bytes
are received. The buffers in the array are only concatenated once, which
avoids the quadratic copying seen before this patch.

This file also seemed to use a mix of DOS and UNIX line endings, which caused my vim to
switch to DOS mode. I fixed this up in the follow-up commit.