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 #18627: Fix typo noticed by Vajrasky Kok.
Issue #18517: Move definition of "xxlimited" extension to detect_modules().
Issue #18325: Fix a test_kqueue failure on OpenBSD: kevent's data and event
members are integers.