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.