statsd & statscompanion communication more robust

If statsd or statsdcompanion crashes, or if one loads
before the other, the other will be able to accomodate.

When statsd loads, it will attempt to tell statscompanion that it's
alive, and then get on to its business, while assuming that
statscompanion is not alive. Only when statscompanion tells statsd
that it is alive, statsd will then start to use it.

When statscompanion loads, it will attempt to tell statsd that it's
alive and then do nothing (since it has nothing to do). When statsd
tells statscompanion that statsd is alive, statscompanion will respond,
telling statsd that it is alive and, if that binder call returns, will
get to work.

This way, if statsd loads first, it can work unobstructed until
statscompanion informs statsd that it is alive, at which point they
shake hands and work. Conversely, if statscompanion loads first, it will
do nothing until statsd contacts it, at which point they will shake
hands and work.

Test: manual
Change-Id: I969ad47fb8060e27814d05ad37433a02711cfa6a
diff --git a/cmds/statsd/src/main.cpp b/cmds/statsd/src/main.cpp
index f9265c6..161b630 100644
--- a/cmds/statsd/src/main.cpp
+++ b/cmds/statsd/src/main.cpp
@@ -129,6 +129,10 @@
         return -1;
     }
 
+    // TODO: This line is temporary, since statsd doesn't start up automatically (and therefore
+    // the call in StatsService::SystemRunning() won't ever be called right now).
+    service->sayHiToStatsCompanion();
+
     // Start the log reader thread
     err = start_log_reader_thread(service);
     if (err != NO_ERROR) {