adbd: properly close subprocess pipes on Ctrl+C.

When non-interactive sessions exit via Ctrl+C, adbd sends SIGHUP
to the child process to let it know to exit. However, adbd was not
closing the pipes to the child process, so if the subprocess ignored
SIGHUP and continued writing it could fill up the pipe and block
forever while adbd waits for it to exit.

This CL adds the necessary calls to close the subprocess pipe after
sending SIGHUP.

Bug: 28981563
Change-Id: I318e322e563241052648361172f4859c297837fb
diff --git a/adb/shell_service.cpp b/adb/shell_service.cpp
index e8dad58..b038fda 100644
--- a/adb/shell_service.cpp
+++ b/adb/shell_service.cpp
@@ -477,8 +477,14 @@
                 // and only fall back on this for unexpected closures.
                 D("protocol FD died, sending SIGHUP to pid %d", pid_);
                 kill(pid_, SIGHUP);
+
+                // We also need to close the pipes connected to the child process
+                // so that if it ignores SIGHUP and continues to write data it
+                // won't fill up the pipe and block.
+                stdinout_sfd_.clear();
+                stderr_sfd_.clear();
             }
-            dead_sfd->reset(-1);
+            dead_sfd->clear();
         }
     }
 }