py33: unknown encoding: base64 Edit

Python 3 doesn't support str.encode('base64'), we should use the
module "base64" instead.

Close-Bug #1229161

Change-Id: I1432952558f8c5c3cff39761306e91916d80207f
if we have a valid auth token, use it instead of generating a new one

If authenticating with a valid token (i.e., token auth, not
username/password auth), novaclient would instruct keystone to issue
a new token with an identical expiry to the one used, and pivot
onto it.  This makes it appear as though Nova is leaking Keystone
tokens.

Since there's zero benefit to issuing a new token that is ostensibly
identical to the perfectly good token used to authenticate, make
novaclient keep using the token it already has after successful
validation, and not issue a new one.

This patch set adds a new pair of tests to the
AuthenticateAgainstKeystoneTests class, which parrot the current
authentication pass/fail tests, but exercise the new code paths

Also adds a fix by Joe Gordon to make os_cache work correctly.

Change-Id: Ic4f0e6d506d8d81f0b1d46138e7e19d3b3392e1d
Fixes: Bug 1197201
Related-Bug: 1214658
Merge "py33: unknown encoding: base64 Edit"