SocketClient: don't ignore SIGPIPE

1) All current users are better off ignoring SIGPIPE at the beginning
   of their process instead of ignoring it just for SocketClient
2) This isn't thread safe if users did want it, since sigaction()
   ignores SIGPIPE for the entire process
3) This costs 5-10% of logd CPU time when logcat is reading logs

Also clean up the error handling in SocketClient::sendDataLockedv().

Test: kill logcat and see that logd doesn't crash
Test: run simpleperf and see that no cycles are going to sigaction
Change-Id: I6532c8a0d71338e534411707b9a9bd785145c730
diff --git a/logd/main.cpp b/logd/main.cpp
index 93dadf5..c92c5b7 100644
--- a/logd/main.cpp
+++ b/logd/main.cpp
@@ -218,6 +218,8 @@
 // logging plugins like auditd and restart control. Additional
 // transitory per-client threads are created for each reader.
 int main(int argc, char* argv[]) {
+    // We want EPIPE when a reader disconnects, not to terminate logd.
+    signal(SIGPIPE, SIG_IGN);
     // logd is written under the assumption that the timezone is UTC.
     // If TZ is not set, persist.sys.timezone is looked up in some time utility
     // libc functions, including mktime. It confuses the logd time handling,