[wgsl] Add outerProduct polyfill and other intrinsic renames

outerProduct needed a polyfill, refactored the the inverse handling
and the new outerProduct to store whether or not the functions are
written more compactly.

Added some simple intrinsics for bit operations that just had different
names in wgsl.

Mapped roundEven and round to wgsl's round() function, which is spec'ed
as being roundEven.

Added casts from unsigned returns of findLSB/findMSB/bitCount to the
signed types that SkSL was expecting for both wgsl and msl generation
(other backends appear correct).

Also fixed the emulation of findMSB in MSL to subtract from 31.

Bug: b/465408252
Change-Id: I80639d820bab464c8e0acae6486a25e0b45b7d6c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1120436
Reviewed-by: Thomas Smith <thomsmit@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
29 files changed