DO NOT MERGE Add data integrity checking for wifi passwords

Cherry pick of the following CLs to pi-dev:

ag/6709482, ag/6841349, ag/6869071

Bug: 128318105
Test: Triggered a failure to exercise new code and ran
      tests/wifitests/runtests.sh

Change-Id: I2e8e3b766727365be1055d04a52d0c96d84d6465
4 files changed