* Refactor env var methods
Have the iteration return for the first match, instead of comparing
all elements and choosing the first one that matches.
* Combine file and json credentials detection
Allow an environment variable to contain either a file path
or JSON to describe the credentials.
This change matches how these variables are used in Google Cloud.