Adjust import items according to hacking import rule

This patch adjust import items and add missing blank lines acording
to http://docs.openstack.org/developer/hacking/#imports
{{stdlib imports in human alphabetical order}}
\n
{{third-party lib imports in human alphabetical order}}
\n
{{project imports in human alphabetical order}}
\n
\n
{{begin your code}}

hacking project also enforce some checks for import group.
Let make the change in keytoneclient

Change-Id: Ic83bd5ee426905588f4a2d555851a9a01fc69f02
Tests use cleanUp rather than tearDown

The tests were putting clean-up code in tearDown. Using tearDown
causes problems with developing and testing because if there's an
exception raised in setUp then tearDown is not called and this
can affect other tests and make it hard to figure out what the
problem was.

Also, this should make it easier to switch to using fixtures since
fixtures use cleanUp.

Change-Id: Ifc22dfd9012402c895a09534f4b1d9bd7a2ec931
Copy s3_token middleware from keystone

The s3_token middleware was in keystone but it should be in
python-keystoneclient. As a first step to removing s3_token from
keystone, copy it to python-keystoneclient. Also copy the tests.

A couple of changes were required

- Changed oslo-incubator imports from keystone to keystoneclient.
- Changed logging from oslo-incubator to use Python logging and
  configured the same way as the auth_token middleware.

I checked and I didn't see anything to be added to requirements.txt
or test-requirements.txt.

bp s3-token-to-keystoneclient

Change-Id: I64fef4101180e5aa661442d538c3237bdad0c37c
Closes-Bug: #1178741
Return role names by AccessInfo.role_names

A new method was introduced on AccessInfo class. The method role_names
returns a list of role names of a user associated to the authorization
request.

bp keystoneclient-auth-ref-get-roles

DocImpact

Change-Id: I0862aaaa27193119dc83ef38100c88b48a1d24a4
Python 3: fix tests/test_utils.py

Only call decode('utf-8') on bytes, not on text strings.

Change-Id: Id856ab4775797d486831f5abb927429b8230c5c1
Merge "Copy s3_token middleware from keystone"
Merge "Adjust import items according to hacking import rule"
Merge "Return role names by AccessInfo.role_names"
Merge "Python 3: fix tests/test_utils.py"
Merge "Tests use cleanUp rather than tearDown"
Use HTTPretty in S3 test code

Remove the httplib specific mocks that are used within the S3
middleware. This won't work when we convert S3 middleware to use the
requests library.

Change-Id: Iee5f3089286c980bef3a19dc9d5068399946e217
Related-Bug: #1275598