Refactoring _get_environment.

- Removes use of "global" by putting the env name in another
  namespace.
- Splits logic into digestible pieces.
- Also makes slight change to GoogleCredentials docstring.

This is the first chunk of #80. I'm happy to wait until #82 is in and rebase.
I don't know anything about epydoc, so it's unclear. I hope not.