PileUpTools: Fix cppcheck warning.
We were getting a pointer from a unique_ptr that is then recorded in SG. Use std::launder to hide this fact from cppcheck so that it doesn't warn that the pointer lives past the end of the unique_ptr. But also fix the case where we may have actually used a dangling pointer if the record failed.