Image Jpeg compression moved to a separate class for better unit testing, more tests added

Change-Id: I493f3d26df8eea26755eb8bceee769c3f513fb90