New tests for TokenCloudCredentials

Replaces hard-to-run integration test with self-contained
unit tests.
Merge pull request #1200 from christav/token-unit-test

New tests for TokenCloudCredentials