add proper dependencies on expat headers and sources
#16564: Fix regression in use of encoders.encode_noop with binary data.
#17166: fix _dummy_thread import example.

Report and patch by Berker Peksag.
Issue #17156: pygettext.py now uses an encoding of source file and correctly
writes and escapes non-ascii characters.
Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) in the interpreter.

I've left a couple of them in: zlib (third-party lib), getaddrinfo.c
(doesn't include Python.h, and probably obsolete), _sre.c (legitimate
use for the re.LOCALE flag).
Issue #6975: os.path.realpath() now correctly resolves multiple nested symlinks on POSIX platforms.
Issue #1470548: XMLGenerator now works with binary output streams.
Fix a test for SpooledTemporaryFile (added in issue #10355).
Issue #17149: Fix random.vonmisesvariate to always return results in [0, 2*math.pi].