platform2: change smart battery metric retrieval

Change cros_healthd_tool in debugd to use ProcessWithOutput
instead of trying to reinvent the wheel. Make the corresponding
changes to cros_healthd to use the new D-Bus interface, which
returns a string instead of a file descriptor. Add more test
coverage to cros_healthd.

BUG=chromium:1035138
TEST=build and deploy debugd, debugd-client, diagnostics to
nami and run 'telem --category=battery'. Make sure the
smart metrics are nonzero. Also run diagnostics unit tests.

Change-Id: I3b5707ccefd348d734b75e0d815ed7127d2e4763
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform2/+/2002959
Tested-by: Paul Moy <pmoy@chromium.org>
Commit-Queue: Paul Moy <pmoy@chromium.org>
Reviewed-by: Kartik Hegde <khegde@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
diff --git a/debugd/src/process_with_output.h b/debugd/src/process_with_output.h
index 6079045..747eefb 100644
--- a/debugd/src/process_with_output.h
+++ b/debugd/src/process_with_output.h
@@ -29,6 +29,7 @@
   ProcessWithOutput();
   ~ProcessWithOutput() override;
   bool Init() override;
+  bool Init(const std::vector<std::string>& minijail_extra_args) override;
   bool GetOutput(std::string* output) const;
   bool GetOutputLines(std::vector<std::string>* output) const;