Decode / Encode string utils for openstack

Currently some clients lack of non-ASCII characters support. This patch
introduces 2 functions (strutils.py) that will help clients and servers
to "safely" encode and decode strings.

About the ensure_(str|unicode) functions:

    They both try to use first the encoding used in stdin (or python's
    default encoding if that's None) and fallback to utf-8 if those
    encodings fail to decode a given text.

    Neither of them will try to encode / decode non-basestring objects
    and will raise a TypeError if one is passed.

Use case:

This is currently being used in glanceclient. I5c3ea93a716edfe284d19f6291d4e36028f91eb2

Needed For:
    * Bug 1061156
    * Bug 1130572

Change-Id: I78960dfdb6159fd600a6f5e5551ab5d5a3366ab5
Merge "Decode / Encode string utils for openstack"