Expose a Builder-based encode interface.

I wrote this patch to be as minimally invasive as possible. This allows
a streaming CSV encoder to be far more efficient, by allowing it to fill
up an existing buffer instead of creating a new buffer for each record.