Sync with oslo-incubator (git 6827012)

This syncs the common/ modules with oslo-incubator, which
brings a few hacking fixes and py3k compat fixes.

Change-Id: I948aafebd25ae0b3aad119c41d0a121c8b9c5ae8
Merge "Sync with oslo-incubator (git 6827012)"