Adding general redirection support for the Stormpath REST API

The support that was added works for any request to the Stormpath REST API that returns a redirection response, although the fix was motivated by the 'current tenant' redirection issue.