Fix various alignment violations (#32513)
The C standard forbids accessing pointers that are not sufficiently
aligned for their base type under the penalty of undefined behavior.
On most architectures we support, this doesn't make a difference
(except if the compiler tries to SIMD things), but it does matter
on some (e.g. SAFE_HEAP mode in wasm), so make some progress
on using the proper unaligned accessors in various places that use
underaligned pointers.