Sync apiclient and py3kcompat from oslo

In the process of unification of the clients code we should
reuse common functionality from Oslo.

Related to blueprint common-client-library-2

Change-Id: If261bce6f2f7676484594c45970d6dd8e676ca79
Reuse Resource from oslo

In the process of unification of the clients code we should
reuse common functionality from Oslo.

Related to blueprint common-client-library-2

Change-Id: I3d82621cced57ad7bc14a2a40e4bef7522f233da
Merge "Sync apiclient and py3kcompat from oslo"
Merge "Reuse Resource from oslo"