Add hacking check for explicit import of _()

To ensure the right message catalog is used when translating
messages we need to make sure to explicitly import '_' in
any files that use that function.  We cannot count on
unit test to catch cases where the user has forgotten to
import the _() function.

This hacking check ensures that the function has been imported
anywhere that it is used.  Unit tests for the hacking check are
included.

Change-Id: I9d8101916bcb449345d3123617c2ac75776d053e
Convert glance unit tests to not use stubs

Takes unit tests that were testing some helper functions in the
nova.image.glance module out of the TestGlanceImageService test case
class and puts them in separate test classes that do not use the
nova.tests.glance.stubs module -- instead, I converted them to just use
the simpler mock library and only test the specific things that the unit
tests were supposed to test.

Change-Id: I2c19268ce6a20eaaed99eda97f63cd1babd5e380
Merge "Add hacking check for explicit import of _()"
Merge "Convert glance unit tests to not use stubs"