Use hashed token for invalid PKI token cache key

Invalid PKI tokens are cached in memcache using the entire token as
key. This triggers the familiar memcache key length error since a
PKI token is much longer than 250 characters.

This change hashes the token before using it as a key, and also changes
instances of "token" to "token_id" where appropriate so it's clear
that we're passing around a hashed token rather than the token data
itself.

Change-Id: I765b209578d60266da706094f61d8d9b15cfb6de
Closes-bug: 1206347
clearer error when authenticate called without auth_url

Fixes bug #1212729

Change-Id: Icd55b77fcd58db182e5c0fe0c230e7fc9d8a57ff
Support older token formats for projects in accessinfo

Older token formats get decoded as a v2 token so we should support
reading project information from these tokens.

Change-Id: I31473a00b294bd0d7b535cfab8d2eaf09db97ff5
Add domain attributes to accessinfo

user_domain_id and project_domain_id are already available, so simply
add an equivalent user_domain_name and project_domain_name if available.

The use of 'default' for v2 tokens is inspired from the default behaviour of
similar functions and what is used in auth_token middleware.

Change-Id: Ia9b345529072ab893d04c7a38fb7ba3acdc28227
Merge "clearer error when authenticate called without auth_url"
Merge "Support older token formats for projects in accessinfo"
Merge "Use hashed token for invalid PKI token cache key"
Merge "Add domain attributes to accessinfo"