libchromeos: Implement I/O watching in MessageLoop.

This patch introduces a simple I/O watching method to the MessageLoop
interface following the pattern used by shill and what glib and libevent
can offer as implementation backend. This also includes implementations
for the GlibMessageLoop and the FakeMessageLoop.

BUG=brillo:91,chromium:402066
TEST=Added unittest to validate GlibMessageLoop.

Change-Id: I0a0032bc40f6fd046b8b98076e0f553cdcd69051
Reviewed-on: https://chromium-review.googlesource.com/282110
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
7 files changed