First (uncontroversial) part of issue 9807.

* Expose the build flags to Python as sys.abiflags
* Shared library libpythonX.Y<abiflags>.so
* python-config --abiflags
* Make two distutils tests that failed with --enable-shared (even before this
  patch) succeed.
* Fix a few small style issues.
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 6203061..e008281 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -468,6 +468,8 @@
         self.assertTrue(vi > (1,0,0))
         self.assertIsInstance(sys.float_repr_style, str)
         self.assertIn(sys.float_repr_style, ('short', 'legacy'))
+        if not sys.platform.startswith('win'):
+            self.assertIsInstance(sys.abiflags, str)
 
     def test_43581(self):
         # Can't use sys.stdout, as this is a StringIO object when