service_example: Pass the brillo::MessageLoop to BinderWatcher.

The default BinderWatcher constructor expects the brillo::MessageLoop
to be marked as current. This patch passes the brillo::MessageLoop
explicitly to the BinderWatcher instead.

While at it, fixed the stdin line parsing when the message has spaces.

Bug: 26356682
TEST=mmma product/google/common/service_example
TEST=Deployed on edison-eng. It works.

Change-Id: I126a553fa1df5fd1e4bc0588b989fa38ec8d0fc9
diff --git a/service_example/brillo_example_client.cpp b/service_example/brillo_example_client.cpp
index 21804ee..cb49720 100644
--- a/service_example/brillo_example_client.cpp
+++ b/service_example/brillo_example_client.cpp
@@ -49,7 +49,7 @@
 void StdinCallback(
     android::sp<android::brillo::example::IExampleService> service) {
   std::string line;
-  std::cin >> line;
+  std::getline(std::cin, line);
   service->Log(android::String16(line.c_str()));
 }
 
@@ -73,7 +73,7 @@
   brillo::BaseMessageLoop message_loop{&message_loop_for_io};
 
   // Initialize a binder watcher.
-  brillo::BinderWatcher watcher;
+  brillo::BinderWatcher watcher(&message_loop);
   watcher.Init();
 
   // Poll stdin.
diff --git a/service_example/brillo_example_service.cpp b/service_example/brillo_example_service.cpp
index cf98665..fd24a7e 100644
--- a/service_example/brillo_example_service.cpp
+++ b/service_example/brillo_example_service.cpp
@@ -73,7 +73,7 @@
   brillo::BaseMessageLoop message_loop{&message_loop_for_io};
 
   // Initialize a binder watcher.
-  brillo::BinderWatcher watcher;
+  brillo::BinderWatcher watcher(&message_loop);
   watcher.Init();
 
   // Run the message loop.