Sync common code from oslo-incubator

The structure of the client is modeled after that of
saharaclient. These utilities will be used later for
building the cli.

Change-Id: I35f6514697f1e5b33d25ec00649c0d35732cc9bf