Add e2e cmdline tests and fix Flush with no producers

Adds end-to-end coverage of the cmdline interface.
It is not simple anymore and recently became a source of bugs.
Furthermore, fix a minor bug that caused Flush() on an empty
tracing session to timeout (and waste time during tests).

Bug:120607375
Change-Id: Idcdbdd4a03712988beb65ec0b386769898ec98d8
diff --git a/test/test_helper.h b/test/test_helper.h
index 89a2fde..a5a1301 100644
--- a/test/test_helper.h
+++ b/test/test_helper.h
@@ -32,6 +32,8 @@
 
 class TestHelper : public Consumer {
  public:
+  static const char* GetConsumerSocketName();
+
   explicit TestHelper(base::TestTaskRunner* task_runner);
 
   // Consumer implementation.