Reduce image_list_detailed calls

When showing a form of launching an instance, image_list_detailed is called twice.
populate_image_id_choices and populate_instance_snapshot_id_choices both call
get_available_images(). get_available_images() supports the cache of image list
and it is better to share the cache by both methods.

Closes-Bug: #1229080

Fixes a bug that utils.get_available_images() raises a traceback
when image_list for a project raises an exception.

Closes-Bug: #1229083

Add unittests for images_and_snapshots.utils to cover the above two fixes.

Change-Id: I829a430c84e48de4faf028bdfad74b0cd8f22dc9
Merge "Reduce image_list_detailed calls"