Rebasing #1148 on top of current cmake branch
Related to #1047
---------
Co-authored-by: Bartek Zdanowski <bartek.zdanowski@gmail.com>
Co-authored-by: Joey Parrish <joeyparrish@google.com>
Created SubsampleGenerator to generate subsamples.
This is part of the EncryptionHandler clean up to make it more modular
and testable.
Change-Id: I6f4076b057027c72335beb3cbf1965341eb18031