Add new error for invalid response

There are a number of places where we expect a certain format of
response. If it's not found we often end up raising a KeyError when
accessing data.

Create a new Exception type that is raised when a HTTP response is not
appropriate for parsing and use it within authentication calls.

Closes-Bug: #1307306
Change-Id: I3cf2db07a8e76ee17702130e9efb0edf640d293a
Fix the catalog format of a sample token

This token is used for auth_token testing and is a valid v3 token other
than the catalog which is in v2 format.

Convert the catalog to V3 format. Whilst there pretty print the token so
we can more easily see what's happening.

Change-Id: I893ea6e76f3fcc20b13b331911d7b8288b98991d
Ensure that cached token is not revoked

We need to ensure that tokens won't stay in cache after they have been
revoked.

Changed default revocation_cache_time 300 -> 10 seconds.
revocation_cache_time has to be << than token_cache_time to make token
cache efficient.

Fixes bug #1287301

Change-Id: I14c0eacac3b431c06e40385c891a6636736e5b4a
Limited use trusts

Trusts now have a "remaining_uses" field that tracks how many times
a trust can still issue a token. It is decremented by 1 each time a
trust related authentication occurs (call to /auth/tokens), until it
reaches 0 and no token can be issued through this trust anymore. If
set to null (default value), trusts can be used indefinitely to
authenticate.
This is the client side of the implementation.

Closes-Bug: #1250617
Implements: bp trusts-chained-delegation

Change-Id: Ib035a9772b7f035c3a9af102e8e15a860a96a96d
Merge "Add new error for invalid response"
Merge "Fix the catalog format of a sample token"
Merge "Limited use trusts"
Merge "Ensure that cached token is not revoked"