power: Simplify dark resume code.

Replace powerd's DarkResumePolicy class with
DarkResumeInterface. A DarkResumeStub implementation will be
used by tests for a following change to Suspender. The new
interface exposes a simple PrepareForSuspendAttempt() method
that returns the action that should be taken.

Also remove the unused dark_resume_battery_margins pref,
update dark resume unittests to use PowerSupplyStub, and
expand test coverage.

BUG=chromium:384488
TEST=updated tests; also manually tested on link with the
     dark_resume_suspend_durations pref set to "0.0 10"

Change-Id: I166eabdb4568b2e613369dc1173e7010a377ea51
Reviewed-on: https://chromium-review.googlesource.com/205251
Tested-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Commit-Queue: Daniel Erat <derat@chromium.org>
18 files changed