testing: fix resource warning with ManagedHTTPServer

We fork a subprocess to serve requests, but the listening socket is bound
in server constructor and inherited by subprocess. With this pattern, we
have to explicitly close the socket from parent process to prevent the
leak.
13 jobs for master
in 0 seconds, using 0 compute credits, and was queued for 0 seconds