add string builder abstraction.

this should help with generating string buffers in extended json format.
generate a string rather than printf().