Added support for Amazon Cognito.

Includes support for both Amazon Cognito Sync and Amazon Cognito Identity.
Merge pull request #2608 from kyleknap/cognito

Added support for Amazon Cognito.