Issue #10512: close the log file in cgi when running tests.

Thanks to Nadeem Vawda for the find and an initial fix.
diff --git a/Misc/NEWS b/Misc/NEWS
index bcfeb4a..25cad9e 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -54,6 +54,8 @@
 Tests
 -----
 
+- Issue #10512: Properly close sockets under test.test_cgi.
+
 - Issue #10992: Make tests pass under coverage.
 
 - Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due