[libc++][test] Fix and refactor exception tests for std::vector constructors (#117662)

The existing exceptions tests for `vector<T>` have several issues: some
tests did not throw exceptions at all, making them not useful for
exception-safety testing, and some tests did not throw exceptions at the
intended points, failing to serve their expected purpose. This PR fixes
those tests for vector's constructors. Morever, this PR extracted common
classes and utilities into a separate header file, and renamed those
classes using more descriptive names.

GitOrigin-RevId: 37797d3e802f9e740b05556cdaa3bb1f6cdef5e0
2 files changed