Persist UID stats, lazy loading, resize buckets.

Persisting detailed UID stats in separate "netstats_detail.bin" file
to enable different schedules for summary and detail polling.  Only
load detailed UID history on demand, since it's not needed during
boot.  Add test to verify UID stats are persisted across simulated
reboot.

Move external settings into well-named interface, which is still
backed by Settings.Secure.  During periodic poll events, resize any
history to match current bucket duration setting.  Test to verify.

Change-Id: I6366f3583a591f8ba859b0e5987daf8cafa4e95a
3 files changed