[gardening] Fix gen_snapshot crash on msvc.
[gardening] Fix gen_snapshot crash on msvc.

Revert change to StringRAII which used to take reference, but was changed to take pointer in 2ead86ab9dcbfe9217af01670c7d93ede73381c9

Fixes https://github.com/dart-lang/sdk/issues/49978
TEST=ci

Change-Id: I8d8b18e6e9ae3cd07427ee1b37df404d11dcb26e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260402
Commit-Queue: Alexander Aprelev <dfb74c35a357c2059971a4bf7fe26b6a7c18085d@google.com>
Reviewed-by: Liam Appelbe <78c2029e58e395825ba7228e218c841bb436a9e9@google.com>

dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk