Synced jsonutils and its dependencies from oslo-incubator

The sync includes change that drastically enhances performance on Python
2.6 with fresh simplejson library installed.

The latest commit in oslo-incubator:
- 2e1214b74b5448825d3db26e1308a51b468d3d5c

Included commits:
* gettextutils.py:
  - de4adbc pep8: fixed multiple violations
  - 9912e5d Add API for creating translation functions
  - 6cc96d0 Fix test_gettextutils on Python 3
  - fd33d1e Fix gettextutil.Message handling of deep copy failures
  - 047b2e4 Change lazy translation to retain complete dict
* importutils.py:
  - 1173e46 Remove ValueError when accessing sys.modules
  - 885828a Deleted duplicated method in cliutils.
* jsonutils.py:
  - 0d7296f Add kwargs to jsonutils.load(s) functions
  - 18f2bc1 Enforce unicode json output for jsonutils.load[s]()
  - 9e5a393 jsonutils.load() accepts file pointer, not string
  - a6b2aec On Python <= 2.6, use simplejson if available
  - e3a1d9c Use six.moves.xmlrpc_client instead of xmlrpclib
* strutils.py:
  - 8a0f567 Remove str() from LOG.* and exceptions
  - fd18c28 Fix safe_encode(): return bytes on Python 3
  - 302c7c8 strutils: Allow safe_{encode,decode} to take bytes as input
  - bec3a5e Implements SI/IEC unit system conversion to bytes
  - e53fe85 strutils bool_from_string, allow specified default
* timeutils.py:
  - 250cd88 Fixed a new pep8 error and a small typo

Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f
Closes-Bug: 1314129
Implemented S3 multi-part upload functionality

Adding large images to glance now uses the S3 MultiPart Upload REST API.
Added a unit test to upload images of various sizes to trigger the usage
of the S3 Multipart Upload API and ensure that it is being exercised.

DocImpact: The following parameters are added in glance-api.conf
+# Size, in MB, should S3 start chunking image files
+# and do a multipart upload in S3. The default is 100MB.
+#s3_store_large_object_size = 100
+
+# Multipart upload part size, in MB, should S3 use when uploading
+# parts. The size must be greater than or equal to
+# 5MB. The default is 10MB.
+#s3_store_large_object_chunk_size = 10
+
+# The number of thread pools to perform a multipart upload
+# in S3. The default is 10.
+#s3_store_thread_pools = 10

Implements: blueprint s3-multi-part-upload
Change-Id: I36e28e7944e57cd7ac05e46afac461ec10245c68
Fix lazy translation UnicodeErrors

upload_utils is concatenating str and Message objects which doesn't work
on python 2, so change the str to a unicode object.

test_quota.py was casting Message objects to str which fails for the
same reason, so rather than cast to str, cast using six.text_type.

See oslo commit 2cfc1a78d8063cf20083cf7df796d730a576551c for history and
details on why the Message object doesn't support __str__ casting.

This is a small part of a larger effort that the oslo team will be
rolling out with graduation and adoption of the oslo-i18n library.

Closes-Bug: #1334774

Change-Id: I9d3f29c661f1afffabbbbb499f48d37ef5a8fcee
Merge "Implemented S3 multi-part upload functionality"
Merge "Fix lazy translation UnicodeErrors"
Merge "Synced jsonutils and its dependencies from oslo-incubator"
Unifies how BadStoreUri gets raised and logged

Refactoring store code to raise BadStoreUri in unified way.

Changes BadStoreUri messages being logged as info from debug.

Fixes translations accordingly.

Ensures no URI's nor credentials logged with these messages.

Closes bug #1287506

Change-Id: I246885d68b0af9e91ede48aaa2b1e6849e5b3b3d
Removing translation from debug messages

Related bug #1317847

Change-Id: I1dfaee94300178da3200edc219ce3d00b0689bdc