Sync jsonutils (and dependencies) from oslo-incubator

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

The sync adds a new 'strutils' module that is now used in jsonutils.

Changes:

jsonutils
---------
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
3a31bba Python3 support for xmlrpclib
e6494c2 Use six.iteritems to make dict work on Python2/3
12bcdb7 Remove vim header
3d7504b Ensure that Message objects will be sent via RPC in unicode format

gettextutils
------------
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
6d55e26 Add support for translating log levels separately
afdbc0a Fix E501 in individual openstack projects
9d529dd Make Message keep string interpolation args
ec6d900 Add support for locales missing from babel
221c37d Allow the Message class to have non-English default locales
0e1af5b Implementation of translation log handler
8b2b0b7 Use hacking import_exceptions for gettextutils._
2cfc1a7 Translation Message improvements
45658e2 Fix violations of H302:import only modules
12bcdb7 Remove vim header
3970d46 Fix typos in oslo
88db9c8 When translating if no locale is given use default locale
04c1b5a Type check for Message param to avoid AttributeError
89369c3 gettextutils: port to Python 3
6d49bca Translate all substitution elements of a Message object

importutils
-----------
1173e46 Remove ValueError when accessing sys.modules
885828a Deleted duplicated method in cliutils.
12bcdb7 Remove vim header

strutils
--------
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
8b2b0b7 Use hacking import_exceptions for gettextutils._
84d461e Fix a bug in safe_encode where it returns a bytes object in py3
12bcdb7 Remove vim header
3970d46 Fix typos in oslo
1a2df89 Enable H302 hacking check
67bd769 python3: Fix traceback while running python3.
b0c51ec Refactors to_bytes
472d8ed Add slugify to strutils
7119e29 Enable hacking H404 test.
4246ce0 Added common code into fileutils and strutils.
536c39e Add 't', 'y', and `strict` to `bool_from_string`
d9b0719 Handle ints passed to `boolean_from_string`
8c964a2 Do not import openstack.common.log in strutils
e700d92 Replaces standard logging with common logging
547ab34 Fix Copyright Headers - Rename LLC to Foundation
bd5dad9 Decode / Encode string utils for openstack
7cf239c Rename utils.py to strutils.py

timeutils
---------
250cd88 Fixed a new pep8 error and a small typo
71208fe Fix spelling errors in comments
7013471 Fix typo in parameter documentation (timeutils)
ae931a9 Avoid TypeError in is_older_than, is_newer_than
12bcdb7 Remove vim header
f3b5f17 Add helper method total_seconds in timeutils.py
53ebd30 python3: use six.text_types for unicode()
3bc6f79 Fix timeutils.set_override_time not defaulting to current wall time
af76064 Optimize timeutils.utcnow_ts()

Change-Id: Ib3dc0b713ed90396919feba018772243b3b9c90f
Closes-Bug: 1314129
Merge "Sync jsonutils (and dependencies) from oslo-incubator"