Avoid many temporary allocations when serializing service protocol responses
Avoid many temporary allocations when serializing service protocol responses

- [x] Use an on stack buffer for small string allocations.
- [x] Avoid unnecessary calls to strlen.

Related #29207

BUG=
R=rmacnak@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2791633002 .

dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk