Add base classes for image tests.

This commit breaks out common functionality from the image test class
an moves it into a set of base classes. The base class also abstracts
out the create_image call and adds resource tracking. This way each
individual test class doesn't have to worry about cleaning up images
created for tests.

Change-Id: I55818f2565652cfffad5a66f44e1c7f81d73c5cf
6 files changed