Fix fuzzer-discovered error with inlining unscoped variables.

SkSL forbids unscoped variable declarations as child statements of
loops or if statements, e.g. `if (true) int x = 123;`. The fuzzer
discovered that it could synthesize this construct via the inliner,
leading to an assertion.

The inliner already had a mechanism for adding braces when inlining
a call into an unscoped child statement like this, but it assumed
that a single statement would be safe to use without adding a scope.
Now, it will brace single statements as well.

Change-Id: Iac2d64ebbab92d8ca91311a09d7fac33c861427c
Bug: oss-fuzz:51960
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/587097
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
6 files changed