[Concurrency] Eliminate StatusRecordLockRecord.
Draft PR, this still needs a Win32 implementation of RecursiveMutex.
Move to a recursive lock inline in the Task. This avoids the need to allocate a lock record and simplifies the code somewhat.
Change Task's OpaquePrivateStorage to compute its size at build time based on the sizes of its components, rather than having it be a fixed size. It appears that the fixed size was intended to be part of the ABI, but that didn't happen and we're free to change this size. We need to expand it slightly when using pthread_mutex as the recursive lock, as pthread_mutex is pretty big. Other recursive locks allow it to shrink slightly.
We don't have a recursive mutex in our Threading support code, so add a RecursiveMutex type.
rdar://113898653
@swift-ci Please Build Toolchain Linux Platform
@swift-ci Please Build Toolchain macOS Platform
@swift-ci Please test Windows platform
@swift-ci Please test Windows platform
@swift-ci please test
embedded/concurrency-leaks.swift fails because it checks for the lock record being allocated and destroyed. Removing those lines since that no longer happens.
@swift-ci please test
Windows failed due to an unrelated issue on main which is now fixed, retrying.
@swift-ci please test windows platform