Add bootstat_archive to save bootstat files at shutdown.

This adds a new `bootstat_archive` command that will save the
current bootstat files in /tmp to a specified directory.  The
command will allow preserving boot time data past reboot, which
will prevent losing diagnostic information about boot time
anomalies when rebooting.

This also adds a new feature to bootstat_summary to allow using
a saved archive directory, to make it easy to look at historical
boot time data on a device.

BUG=chromium:276767
TEST=integration testing with other changes

Change-Id: I7078372e8b924d99df34b2238ced835820143733
Reviewed-on: https://chromium-review.googlesource.com/168070
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Daniel Erat <derat@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Commit-Queue: Richard Barnette <jrbarnette@chromium.org>
2 files changed