libbrillo: provide Daemon method to do init on message loop

In OnInit the message loop may not be instantiated yet, so if
some initialization has to happen asynchronously it might have
any task runner to post tasks to. Allow subclasses of Daemon to
provide a method implementation with initialization that must
take place when the message loop has started and is the current
message loop.

BUG=b:74250103
TEST=with modemfwd

Change-Id: I4c9a35934681a24730b01b60e9bca5e853e104ef
Reviewed-on: https://chromium-review.googlesource.com/959524
Commit-Ready: Eric Caruso <ejcaruso@chromium.org>
Tested-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
2 files changed