Import missing gettextutils._ in shell.py

Closes-Bug: #1355252

Change-Id: I3aef19235735b3b374b92985f142712cb0f37a35
Work toward Python 3.4 support and testing

Change-Id: I0498fcfdf9eee399e29de5b034fd6010682ca4b6
Fix v2 requests to non-bleeding edge servers

In the case where v2 requests are sent to a server which is not running
head of tree which includes the v2 metadef code some 404 cases need to
be handled to enable standard requests to complete.

This patch aslo improves fetching schemas -- they are now only
fetched as needed.

Change-Id: I8c871f11b909337bd7df19b77e606772dbc634b2
Closes-bug: #1367326
Merge "Import missing gettextutils._ in shell.py"
Merge "Work toward Python 3.4 support and testing"
Updated from global requirements

Change-Id: I6dc3b647b806b863418d4894f9abe535b3d40ac2
Merge "Fix v2 requests to non-bleeding edge servers"
Merge "Updated from global requirements"
Print traceback to stderr if --debug is set

This change allows easier debugging of client related issues, with a
full traceback printed out when an uncaught error occurs in the client.
Previously, it could be hard to find the portion of code raising an
exception, with just the message from the exception being displayed.

Previous behaviour (with a rather artificial client error being raised):

    $ glance --debug image-list
    Contrived exception

Behaviour after this patch:

    $ glance --debug image-list
    Traceback (most recent call last):
      File "/opt/stack/python-glanceclient/glanceclient/shell.py", line 590, in main
        args.func(client, args)
      File "/opt/stack/python-glanceclient/glanceclient/v1/shell.py", line 77, in do_image_list
        raise(Exception('Contrived exception'))
    Exception: Contrived exception
    Contrived exception

Change-Id: Id7b76b707e5fc16a0402dcb104ec40787e0ffbe2
Handle UnicodeDecodeError in log_http_response

Similar to commit dec9c9f35 and log_curl_request,
this ignores decoding errors when logging response
headers by passing errors='ignore' to safe_encode.

Change-Id: Ic915a7d8334e9473f300c9db670a3a8f5cda8976
Closes-Bug: #1369756
Update how tokens are redacted

Using SHA-1 to match how Nova and Swift redact their tokens.
Was discussed in the below thread:

http://lists.openstack.org/pipermail/openstack-dev/2014-September/045802.html

Here's what nova went with: https://review.openstack.org/#/c/99511/
swift seem to be following suit: https://review.openstack.org/#/c/99632/

Change-Id: I3045d6d9d2a13770f4022dbbd474b34eb1032f6e
Closes-bug: 1329301
Merge "Print traceback to stderr if --debug is set"
Merge "Update how tokens are redacted"