[libc++] Refactor node creation and destruction in list and forward_list (#65614)

This removes a lot of code duplication, makes the code simpler and
prepares the terrain for https://reviews.llvm.org/D101206, which will
fix some UB in the node-based containers.

This also allows removing the dependency of list and forward_list on
unique_ptr by using __allocation_guard instead.

GitOrigin-RevId: 69875d59bc08f358abcb4b4d3a6ed25c059d3441
5 files changed