Limit calls to memcache backend as user token index increases in size

This eliminates the need to do a get on each token in the user's index
on token issuance. This change will change the maximum number of tokens
that can be outstanding for a given user. This change is two-fold, first
instead of using JSON to store the token IDs, the python list structure
is being stored in memcached; second the expiry for the token is also
stored in the list. The net result is that fewer tokens can be stored
in the user's token index list due to an increase in data being stored
per token in the index page.

The new logic will attempt to upgrade the old json-style lists to
the new format of [(token_id, expiry), ...] stored as a native
python object in the memcache backend. This conversion will keep
any outstanding tokens in the list from (<time_of_conversion> +
<configured expiration of tokens>). This is done to ensure that
tokens can still be invalidated by operations that invalidate
tokens based upon user/project/trust/etc changes without causing
potential lockups in keystone trying to retrieve all of the
actual token expiration times from memcache.

Closes-bug: #1251123
Change-Id: Ida39b4699ed6c568609a5121573fc3be5c4ab2f4
Merge "Limit calls to memcache backend as user token index increases in size"