Move _get_locations to module level plus tests

Moves the nova.image.glance.GlanceImageService._get_locations object
method into module level scope (the self argument was unused) and
adds full unit tests for the nova.image.glance._get_location() function.

Change-Id: Ib386330b70abe1e0353f1fafa3e68bc3e7a2d1b1
Partial-bug: #1293938
Merge "Move _get_locations to module level plus tests"