Implement compile-time optimization for mix().

mix() has many overloads:
$genType mix($genType x, $genType y, $genType a);
$genType mix($genType x, $genType y, float a);
$genHType mix($genHType x, $genHType y, $genHType a);
$genHType mix($genHType x, $genHType y, half a);
$genType mix($genType x, $genType y, $genBType a);
$genHType mix($genHType x, $genHType y, $genBType a);
$genIType mix($genIType x, $genIType y, $genBType a);
$genBType mix($genBType x, $genBType y, $genBType a);

The top half were simple to implement via `evaluate_3_way_intrinsic`.

The bottom half--`x, y, $genBType`--required adding basic support into
`evaluate_n_way_intrinsic_of_type` for mixed argument types, since `x`
and `y` could be of any numeric type, but `a` is always boolean.
Fortunately, this didn't require major changes.

Change-Id: I015471f053c90d5a5c3ac67cc230d0f90950ff60
Bug: skia:12034
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414443
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
9 files changed