sha2: Avoid type-punned pointer dereference (#14314)

GCC warns:

 dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

on constructs like

 *(sha_word64*)&var =

so use memcpy to perform such assignments instead.
Merge topic 'sha2-avoid-type-pun' into next

6a365d0 sha2: Avoid type-punned pointer dereference (#14314)