[libc++] Refactor vector move constructor with allocator (#116449)

This PR simplifies the implementation of std::vector's move constructor
with an alternative allocator by invoking __init_with_size() instead of
calling assign(), which ultimately calls __assign_with_size(). The
advantage of using __init_with_size() lies in its internal use of
an exception guard, which simplifies the code. Furthermore, from a
semantic standpoint, it is more intuitive for a constructor to call
an initialization function than an assignment function.

GitOrigin-RevId: 5ce981e76da4094efd055ded54d1f756b1286f18
2 files changed