Add the stream mode

The stream mode behaves differently in versus the existing buffer mode.

1. It leverages rsyslog to persist logs;
2. It leverages logrotate to rotate and compress logs;
3. It persists logs as soon as they are collected.

Add configuration options to choose modes at start up time. When stream
mode is disabled, no difference compared to the existing service.

See README.md for details.

This change also adds mock classes for unit test purpose.

Change-Id: Ic7d02e826c7d9372621c096c6e768e6216974150
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
diff --git a/default.conf b/default.conf
index c751864..5e35f4f 100644
--- a/default.conf
+++ b/default.conf
@@ -1,4 +1,5 @@
 SOCKET_ID=
+MODE=buffer
 BUF_MAXSIZE=3000
 BUF_MAXTIME=0
 FLUSH_FULL=false