Update SkString::resize to preserve string contents efficiently.

Without this change, the following unit test failures would occur:

StringTest.cpp:425     [String_resize_grow]
StringTest.cpp:435     [String_resize_after_assignment]
StringTest.cpp:438     [String_resize_after_assignment]
StringTest.cpp:444     [String_resize_after_copy_construction]
StringTest.cpp:446     [String_resize_after_copy_construction]

Change-Id: Ib4f63d51604e55d32f1049136b733ee905b72039
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/298217
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
3 files changed