bootstat: validate last kmsg and bootreason content more carefully

Establish a tighter trust relationship with digitization of the
battery level.  Validate the reboot reason collected from the last
kmsg.  Validate the last reboot reason before using for enhancing
system reboot reason.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63636262
Change-Id: I45fbac4a33c09295cda89de3b73c93a884033e3b
2 files changed