Add WGSL support for indexed-swizzle lvalues.

Assignments like `vec.wzyx[r] = value;` are not natively supported
by WGSL, since `vec.wzyx` is not an lvalue in WGSL.
However, we already had a transform pass for these for use in
SPIR-V and Raster Pipeline. WGSL now uses this transform as well.

This change exposed a subtle long-standing issue--the Context
used in a CodeGenerator, by default, was missing various fields,
such as a ProgramConfig. They were missing because the front-end
moves them from the Context into the Program at the end of
compilation, but occasionally the back-end needs to create new IR,
and while assembling IR, we expect these fields to be populated.
e.g. this would cause checks like `type->isAllowedInES2()` to fail
when inside the backend, because the "strict ES2" flag is stored
inside the ProgramConfig.

The CodeGenerator base class now assembles a fully-populated
Context during construction. This mirrors a very similar fix
which was needed in SkRP codegen: http://review.skia.org/656437

Change-Id: Ia4670aba2f9fdccc484c96cccb656feb09926e9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/706522
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
6 files changed