Fix expression position of redundant casts.

The fuzzer discovered that by properly structuring a ternary
expression, it could emit a redundant ConstructorScalarCast.
This would be optimized away (good!) but the passed-in Position
would not be preserved; this triggers an assertion. We now
honor the passed-in Position here.

ConstructorCompoundCast had a similar issue which is now also
fixed. Since the fuzzer has never discovered it, this is
probably unreachable right now. Constructor::Convert already
has a similar check so it's likely deflecting all such casts
before they reach ConstructorCompoundCast.

Bug: oss-fuzz:62619
Change-Id: I8ee54457dd115f7916ce83fbe43a9a4e3c55e74d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/759756
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
12 files changed