[DO NOT MERGE] Unify the cropping mechanism in Preview and in Rotation

Move most of the scaling and cropping logic from ImagePreviewFragment
into WallpaperCropUtils and reuse it in DefaultWallpaperPersister when
setting a wallpaper in rotation.

Fixes: 155943055
Change-Id: Id010ee18da7ee055a3595fdeff7122f7ef0d7630
3 files changed