Implement non-trivial ternary expressions in WGSL.

Non-trivial ternary expressions now expand to an if-else statement
and that writes into a temporary variable.

Bug: skia:14082
Change-Id: Id2100a0097999979939a97fca3e12439f3adfc8d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/700229
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
26 files changed