gh-150311: Fix minor issues in configure.ac for Cygwin (#150328)
- Use 'CYGWIN' (uppercase) for ac_sys_system to match the casing used
in all case-pattern references throughout configure.ac.
- Fix LDLIBRARY for static builds: use '.a' extension instead of
'.dll.a' when shared libraries are disabled.
- Replace hardcoded 'gcc' and 'g++' with '$(CC)' and '$(CXX)' in
LDSHARED/LDCXXSHARED for Cygwin.
Co-authored-by: Victor Stinner <vstinner@python.org>