Calling memcpy() inside handle_signal() breaks TSan since the memcpy()
call is intercepted by TSan and if this happens while another interceptor
is being handled, the TSan runtime crashes. Avoid this by using a local
memcpy() implementation that cannot be intercepted.
Note: for Clang 11+ we could also use __builtin_memcpy_inline, but due to
the large size of the ucontext_t structure this generates quite a lot of
code for non-x86 (x86 uses a single single `rep;movsb (%rsi), %es:(%rdi)`).