Move check for development environment into the getNewAccessToken method.

Revision created by MOE tool push_codebase.
MOE_MIGRATION=7102