Sync gettextutils from oslo-incubator

Partially implements bp user-locale-api

Change-Id: I1a053d9d0ad65ca90cac86196da68900b8fe112d
Enforce compute:update policy in API

Now that compute/api.py:update() is no longer being called for instance
updates the policy check is no longer enforced.  This adds policy
checking back in at the API level so that the compute:update policy will
continue to function as it did before.

Bug 1212807

Change-Id: I365ad8ac2845d914deefb841c314a50f4869dba0
Unit-ify the compute API resize tests

Move resize related compute API tests to test_compute_api and make them
unit tests.  This makes test changes easier when converting to objects.

This also caught a couple things where the cells compute api class was
not in sync that don't really end up being bugs, but need to match for
tests to pass.

Change-Id: I194310beb5e821e4a8262310d1bb80e0747e1c43
Convert admin_actions ext tests to unit tests

The tests for the admin_actions API extension (or v3 plugin) are
stubbing out conductor methods, which creates a lot of pain when
compute_api internals are changed.  Convert these tests to unit tests,
checking only that the appropriate compute_api methods are called with
the correct arguments.

Change-Id: I16634efa2397b36afa15b90712bfd678325bc049
Add scheduler utils unit tests

They were missing... although there is some testing via some conductor
tests that are not completely unit-y.  Those will be adjusted next.

Change-Id: I696dd8ff264fffb3ae015c3ae653c0799c60cecf
Fixup some non-unity-ness to conductor tests

This moves some conductor compute task tests into the test class that
only tests the manager side.  It also removes testing of
scheduler_utils's set_vm_state_and_notify method as that is already
tested separately.

Change-Id: I30bd3897311870b10c8ec65182c81d341a904485
Improve performance of driver's get_available_nodes

get_available_nodes() is called every time an instance is updated.  That
ends up calling get_host_stats(refresh=True), resulting in a
libvirt/XenAPI/etc call.  On a build of a new instance when the instance
record is updated often (task_state and progress), this results in a lot
of unnecessary driver calls.

This changes get_available_nodes() to take a refresh kwarg to pass
through to get_host_stats(), defaulting to False so that it uses
the cache.  Places that used get_available_nodes() and are sensitive to
stale data are changed to add refresh=True.  Also adds a helper driver
method for 'is_node_available'.  And make sure that even if drivers'
get_host_stats() methods get refresh=False that they refresh when they
have no stats.

Fixes bug 1210264

Change-Id: I22c8d70e3e70f2d2421915da66c2618688e0db2b