string_bytes: use external for large strings

When large strings are used they cause v8's GC to spend a lot more time
cleaning up. In these cases it's much faster to use external string
resources.

Utf8 strings do not use external string resources because only one and
two byte external strings are supported.

EXTERN_APEX is the value at which v8's GC overtakes performance.
string_bytes: write strings using new API

StringBytes::Write now uses new v8 API and also does preliminary check
if the string is external, then will use external memory instead.