apmanager: fix/refactor dbus object registration

The original logic for DBusObject creation was incorrect, "object_manager"
can be null but "bus" object should not. So fix it by explicitly passing
the "bus" object from the DBusDaeomon to each RegisterAsync function.

Also fix the ShillProxy to not create a new Bus object for initializing
the proxy object, and use the same Bus object that's created in DBusDaemon.

BUG=chromium:439223
TEST=USE="asan clang" FEATURES="test" emerge-$BOARD apmanager
Manual Test:
Start an AP service using apmanager

Change-Id: Ie0518463b7ce3470e9200893806df7a193168d2c
Reviewed-on: https://chromium-review.googlesource.com/233493
Tested-by: Peter Qiu <zqiu@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Peter Qiu <zqiu@chromium.org>
11 files changed