libchromeos: New class to watch child processes.

This patch ports the ProcessReaper class previously used in germ to
libchromeos with a base::Callback interface. This class allows you to
wait for a child process in the message loop, similar to what the
g_child_watch_add() function does in glib. This class is compatible
with both GlibMessageLoop and BaseMessageLoop.

BUG=chromium:361635
TEST=Added unittests.

Change-Id: Ia40246729c99a487fdf0039a28b30ba92f0e7da4
Reviewed-on: https://chromium-review.googlesource.com/288259
Trybot-Ready: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
5 files changed