DESCRIPTION

JCBC-1062: Optimize LegacyTranscoder encoding for strings

Motivation
----------
The LegacyTranscoder still uses the slower JVM-based encoding for
strings and it rather should use the same optimized encoding
path which we use for RawJsonDocument and others.

Modifications
-------------
This code adds a "fastpath" for the string encoding and moves
all the other options into a nested else block so that the buffer
is only allocated if needed (and not twice w/ overridden by the
optimized method).

Result
------
Faster encoding for the string path.

Change-Id: Id67e7f7b905491b3bb5be5f1bf0552a3fd264b79


COMMENTS

author: Natasha Sullivan
date: 2017-03-27 11:00:06.912000000

Uploaded patch set 1.

-------------------------------------
author: Cory Peck
date: 2017-03-27 11:02:15.740000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Natasha Sullivan
date: 2017-03-27 11:58:20.198000000

Patch Set 1: Verified+1

-------------------------------------
author: Marques Ellis
date: 2017-03-27 20:30:33.086000000

Patch Set 1: Code-Review+2

-------------------------------------
