[libc++][NFC] Refactor the core logic of operator new into helper functions (#69407)

This will make it easier to implement new(nothrow) without calling the
throwing version of new when exceptions are disabled. See
https://llvm.org/D150610 for the full discussion.

GitOrigin-RevId: e494a96a69050c7401828f2d5199e1419d3ea55e
1 file changed