Fix issue #21641: Close the socket before raising the SMTPResponseException. Fixes the ResourceWarning in the test run.

Patch by Claudiu.Popa.
merge from 3.4

Fix issue #21641: Close the socket before raising the SMTPResponseException. Fixes the ResourceWarning in the test run.
Patch by Claudiu.Popa.
Issue #21439: Fix a couple of typos.
Issue #21439: Merge with 3.4
Issue #21643: Updated test and fixed logic bug in lib64 symlink creation.
Closes #21643: Merged fix from 3.4.
All modern compilers provide a offsetof() function

offsetof() is used directly in many other .c files without any issue.
Issue #21119: asyncio now closes sockets on errors

Fix ResourceWarning: create_connection(), create_datagram_endpoint() and
create_unix_server() methods of event loop now close the newly created socket
on error.
Issue #21119: asyncio: Make sure that socketpair() close sockets on error

Close the listening socket if sock.bind() raises an exception.
Merge 3.4: Issue #21119, fix ResourceWarning in asyncio

* Make sure that socketpair() close sockets on error. Close the listening
  socket if sock.bind() raises an exception.
* asyncio now closes sockets on errors. Fix ResourceWarning:
  create_connection(), create_datagram_endpoint() and create_unix_server()
  methods of event loop now close the newly created socket on error.
cleanup test_asyncio/test_base_events.py: cm variable was unused
(Merge 3.4) cleanup test_asyncio/test_base_events.py: cm variable was unused
Issue #21651: Fix ResourceWarning when running asyncio tests on Windows.
Patch written by Claudiu Popa.
(Merge 3.4) Issue #21651: Fix ResourceWarning when running asyncio tests on
Windows. Patch written by Claudiu Popa.
Fix asyncio tests on Windows: wait for the subprocess exit

Before, regrtest failed to remove the temporary test directory because the
process was still running in this directory.
(Merge 3.4) Fix asyncio tests on Windows: wait for the subprocess exit

Before, regrtest failed to remove the temporary test directory because the
process was still running in this directory.
Issue #21326: Add asyncio.BaseEventLoop.is_closed() method

Add BaseEventLoop._closed attribute and use it to check if the event loop was
closed or not, instead of checking different attributes in each subclass of
BaseEventLoop.

run_forever() and run_until_complete() now raises a RuntimeError('Event loop is
closed') exception if the event loop was closed.

BaseProactorEventLoop.close() now also cancels "accept futures".
Issue #18409: Idle: add unittest for AutoComplete. Patch by Phil Webster.
Merge with 3.4