* Uses correct scopes for google API based on config.js values.
* Lower the number of parameters that we pass around.
* Fixes googleAPIState state checking.
React Native doesn't define __filename nor __dirname so do it artisanally. In
addition, this helps with centralizing the configuration passed to loggers.