CRAS: system_state - Add task support

Add the support for scheduling a function to be executed in main
thread loop later with no wait time. This is useful for scheduling
asynchronously tasks in main thread.

BUG=chromium:879967
TEST=unittest
Apply patch set to schedule server stream for echo ref dev
and verify the function works as expected.

Change-Id: I71ceade96dc86b353ba14e0507a69e68f9e20082
Reviewed-on: https://chromium-review.googlesource.com/1212623
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
4 files changed