Factored out boilerplate for getting lists of data (images, flavors).
Reduced two functions to one.

Previous calls made to get-flavor-id and get-image-id can now be made with just
get-id.