We now keep a small set of historic procstats data. Each
time you reboot a new set of data is created; each day a
new set of data is created. At most 5 sets of historic data
are kept at a time. Each checkin only prints any existing
historic data (and deletes it); checkins do not include the
current data, to keep the checkin data less noisy.
This requires a bunch of re-arranging of the way state is
maintained to allow the multiple files, and loading and
processing state from old files. Also fixed some problems
with writing/reading state.
The checkin format has been tweaked. There is a new "period"
line that tells you (1) the date/time stamp of the data,
(2) the device realtime data collection started, (3) the
device realtime data collection finished. The difference
between the last two give you the real time duration for
which the data was collected.
Also, the third field of pkgproc and pkgsvc-* can now be
abbreviated: if it is the same as the package name, it is
empty; if it is a suffix fo the package name it starts with
'.'.
Change-Id: I422875fccb627d95df7e36c183ac90056f273d83