libstdc++: Restore allocator constructor for std::packaged_task.
Restores the allocator constructor for `std::packaged_task` and removes incorrect allocator-related specializations from `std::promise`.
This commit restores the allocator constructor for std::packaged_task that was previously removed, aligning with the approved P3503R3 proposal. It also removes allocator-extended constructors of std::promise and std::packaged_task that were added preemptively but are not part of the standard. Additionally, it removes the std::uses_allocator partial specializations for std::promise and std::packaged_task, ensuring consistency across C++ standard versions from C++11 onwards.
In Details
This commit addresses changes related to allocator support in std::promise and std::packaged_task as per P3503R3. It removes incorrect allocator-extended constructors and uses_allocator specializations that were implemented based on an earlier resolution of LWG 2095. The packaged_task(allocator_arg_t, const Alloc&, F&&) constructor is restored by removing a conditional compilation block. These changes align the implementation with the updated standard.
For Context
std::packaged_task and std::promise are C++ standard library classes used for asynchronous computation. Allocators are used to customize memory management. This commit fixes the interaction of these features, specifically how a packaged_task can be constructed with a custom allocator. It rolls back some changes that went too far, and re-enables a constructor that was unintentionally disabled, ensuring the code conforms to the latest C++ standard.