power: Refactor DBusHandler class.

This renames the class's files from util_dbus_handler.* to
dbus_handler.*, makes it use thunks instead of putting
implementation in static methods, removes a bunch of
redundant "DBus" strings from method, type, and variable
names, unifies its method call and signal handler to
eliminate some copy-and-pasted code, and makes its
name-owner-changed code take a regular callback instead of a
function pointer.

It also makes the Daemon class, rather than Suspender,
register for name-owner-changed notifications.
DisplayPowerSetter needs to receive notification when Chrome
is restarted so it can resend the desired state (this will
be done in a following change).

BUG=chromium:218387
TEST=unit tests pass; also did manual testing and verified
     that signals, method calls, and name-owner-changed
     notifications are handled as before

Change-Id: I37ee647d6bbc96b0f52d4c54f39cc26c341f7d0d
Reviewed-on: https://gerrit.chromium.org/gerrit/46640
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
11 files changed