Added a FastByteArrayOutputStream that exposes the underlying array to avoid unnecessary mem copy.

This should fix the extra memory copy introduced by #266.

@mridulm @pwendell @mateiz