Untag and stop watch on network sockets before closing them.

This patch untags the network sockets tagged with qtaguid_tagSocket()
before closing them, releasing the socket from the qtaguid kernel
module. Without this patch, the socket won't be actually closed.

This patch also removes the socket watch right before closing it, which
forces the epoll to stop watching. Closing the file descriptor would
also stop the watch if no other copy of the socket is kept open.
Explicitly stoping the watch is safer.

Bug: 36264049
Test: Ran update_engine under strace; the /proc/net/xt_qtaguid/ctrl
is called and the socket object destroyed and removed from the epoll.

Change-Id: I75c8befe8929e8e60c9534e0e4072f63b2fab1f4
diff --git a/libcurl_http_fetcher.h b/libcurl_http_fetcher.h
index 5b16811..61871c9 100644
--- a/libcurl_http_fetcher.h
+++ b/libcurl_http_fetcher.h
@@ -107,6 +107,10 @@
   }
 
  private:
+  // libcurl's CURLOPT_CLOSESOCKETFUNCTION callback function. Called when
+  // closing a socket created with the CURLOPT_OPENSOCKETFUNCTION callback.
+  static int LibcurlCloseSocketCallback(void* clientp, curl_socket_t item);
+
   // Callback for when proxy resolution has completed. This begins the
   // transfer.
   void ProxiesResolved();