Ensure is_image_available handles V2 Glance API

The V2 Glance API uses warlock to validate returned models
from calls such as GET /images/{id}. The get_locations() call in
the Nova Glance image driver was using the V2 Glance API call
to GET /images/{id} (which is correct, since image locations only
exist in the V2 API), but the GlanceImageService._is_image_available()
method was checking the is_public attribute of the supplied image model.

This caused warlock to throw an exception since is_public is not
an attribute on the V2 API's returned image model in glanceclient.
This change adds some checks that can handle both the V2 and V1 returned
image models from glanceclient and a bunch of unit tests to thoroughly
exercise the is_image_available method.

Change-Id: I35b5af8331c5972bd89e1a674091fa2e3bde28a7
Closes-bug: #1291014
Merge "Ensure is_image_available handles V2 Glance API"