Fixes #9 - Switching Environments Loses Custom HttpStack.

Also upgraded to latest SDK build tools and gradle plugin.