Move all opens in auth_token to be in context

This commit switches the use of open() to be in a with context. This
will prevent leaking file descriptors because using a context
provides an inherent close(). Prior to this commit it was possible
that an exception or error during the write() call could prevent
close() from running.

Change-Id: Ib13fe651d41f0eafea23a1c96c6c64d405de7e49
Add importutils and strutils from oslo

They will be used by apiclient library.

Change-Id: Ifb0d5fa1480c3701316b57d9e59507d608b11753
Allow configure the number of http retries

Allow setting the maximum number of times we want to retry to
http_connect when communicating with the Identity service.

Closes-Bug: 1209194
Change-Id: I56bff55dc808a1188d42f1643a8018a8d49012c6
Add unittests for exceptions.EmptyCatalog

Change-Id: I6cff9501883ba2237e3112a53e01f994f170aadf
Merge "Allow configure the number of http retries"
Merge "Add importutils and strutils from oslo"
Merge "Move all opens in auth_token to be in context"
Merge "Add unittests for exceptions.EmptyCatalog"