Fix Python extension naming on Windows.

The extensions should not be versioned (`-avoid-version`), and for native Windows Python modules, they should have a '.pyd' extension. `AM_LDFLAGS` can't be used because this gets overridden by the library-specific `LDFLAGS` (`MY_LIB_LDFLAGS` must be specified for each library so the `-no-undefined` flag works, as `-no-undefined` cannot be specified in `AM_LDFLAGS`).

I'm not very experienced with writing autoconf configurations so I can't say if I've done a particularly good job of what I want it to do. The `.pyd` change of extension should affect native Windows builds only and not Cygwin builds.