Created SubsampleGenerator to generate subsamples. This is part of the EncryptionHandler clean up to make it more modular and testable. Change-Id: I6f4076b057027c72335beb3cbf1965341eb18031