Refactoring ImageModel constructor

This change creates the scalable object that's attached to the image
model through its constructor. Also adds a 'resourceName' variable
to store attributes.resource, which is mostly used for API calls.

Change-Id: I713c59d1cec5f87387a87c98a59e75b3d5c1050e
Merge "Refactoring ImageModel constructor"