Fix OS X installer build script to handle the pretty-printed _sysconfigdata.py
when removing references to temporary build files.  This is not an elegant
solution but it does isolate changes to just build-installer.py.
Issue #18609, #18408: _ctypes_add_traceback() now clears the current exception
while adding the traceback, because it may call indirectly a Python function
and Python functions must not be called with an exception set.

In the case of the issue #18609, _ctypes_add_traceback() called the iso8859-1
decoder which is implemented in Python. Python has a ISO-8859-1 codec
implemented in C. It is not used because PyUnicode_Decode() only uses the C
codec for other names (aliases) of this codec ("latin-1", "latin1" and
"iso-8859-1").
Issue #18519: Fix test_sqlite on old versions of libsqlite3

With old SQLite versions, _sqlite3_result_error() sets a new Python exception,
so don't restore the previous exception.
Issue #17899: Fix rare file descriptor leak in os.listdir().
Issue #17899: Fix rare file descriptor leak in os.listdir().
(Done as separate patch from trunk as the code has diverged quite a bit.)
Issue #17557: Fix os.getgroups() to work with the modified behavior of
getgroups(2) on OS X 10.8.  Original patch by Mateusz Lenik.
Issue #17557: merge from 3.3
Issue #18627: Fix typo noticed by Vajrasky Kok.
Closes #18627: merge from 3.3
Issue #18517: Move definition of "xxlimited" extension to detect_modules().
Issue #18517: merge from 3.3
Issue #18325: Fix a test_kqueue failure on OpenBSD: kevent's data and event
members are integers.
Issue #18325: Fix a test_kqueue failure on OpenBSD: kevent's data and event
members are integers.
Fix warning: ?ptr2? may be used uninitialized in this function
Backout 62658d9d8926 (issue #10241): it causes a crash at shutdown when deallocating a Tkapp object.