adjust to {SHA1} convention for token

based on openstack-dev mailing list thread, support the {SHA1}
convention for headers that is generally agreed on.

Also fix a minor issue that Johannes found after the review landed,
which was doing substring matching instead of tuple matching.

Change-Id: I80a456c765026ac6179fd424ead01715798c1dac
Merge "adjust to {SHA1} convention for token"