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/meson.build b/meson.build
index 75958fe..ee8ecdb 100644
--- a/meson.build
+++ b/meson.build
@@ -44,7 +44,8 @@
     'src/host_console.cpp',
     'src/log_buffer.cpp',
     'src/main.cpp',
-    'src/service.cpp',
+    'src/buffer_service.cpp',
+    'src/stream_service.cpp',
     'src/zlib_exception.cpp',
     'src/zlib_file.cpp',
   ],