Refactors in advance of crypto-secure boot level

Various refactors that set the stage for a future change to make
max-boot-level keys cryptographically secure.

Bug: 176450483
Test: keystore2_test
Change-Id: I4e4e91ae23991131610c7a40f6d347ddcd528ac7
4 files changed