Teach alloc-opt to handle atomics a bit better (#57208)
Fixes https://github.com/JuliaLang/julia/issues/57190
The fact that this passes thinks memcpy is a potential issue is quite
annoying so it deserves a decent refactor, which flows through the type
information from julia instead of trying to regenerate it on site,
specially given that opaque pointers means we can't really instrospect
into pointers at all