Ports the first part of encryption/key to AOSP.

A few additional changes (apart from style and usual dependencies) were needed:
- Dependency on KeyStore was removed (see b/75771701).
- References to internal names were removed or renamed.
- ByteStringUtils is used as a replacement for the Guava bytes-to-hex-string conversions.
- Uses java's Optional rather than Guava's Optional.
- Change to Slog for logging.
- TertiaryKeyRotationTracker.MAX_BACKUPS_UNTIL_TERTIARY_KEY_ROTATION is now a constant rather than a flag.

Bug: 111386661
Test: atest RunFrameworksServicesRoboTests
Change-Id: If9bcfb1f73ba78c278947b8499236bb536e625eb
10 files changed