Merge changes I8539455e,I14f0d535 into main

* changes:
  Cope with Keymaster->KeyMint device upgrade
  Commonize upgrade_keyblob_if_required_with