Stop artificially rooting SocketAsyncEventArgs (dotnet/corefx#28767)
SocketAsyncEventArgs creates an overlapped object that references the SAEA. That overlapped object creates an async pinning handle in the runtime, which roots the SocketAsyncEventArgs. The cycle from SAEA->Overlapped->handle->SAEA involving the root means that a dropped SAEA that's not Dispose'd will end up leaking.
This commit fixes that by adding a level of indirection between the handle and the SAEA. Rather than wrapping the SAEA directly, the handle is given an intermediate object that references the SAEA, and the SAEA then stores itself as a reference into that object only while an active operation is in progress. Once the operation completes, the reference in that object is nulled out, and the SAEA will no longer be kept alive by the pinning handle.
Commit migrated from https://github.com/dotnet/corefx/commit/
4d6521c572c44c5872281c125d8e341af054eec3