Enforce trivially-copyable types on unaligned loads/stores/casts.

These correctness checks were inspired by Chromium's bit_cast:
https://chromium.googlesource.com/chromium/src/base/+/refs/heads/master/bit_cast.h

This also closes out a long-standing TODO in the code.

Change-Id: Iaf570fc564955ba90115a52bcaa743a170bdbdc4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/305718
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2 files changed