Added role-based connection option

This PR allows to use role-based authentication for AWS instances as described in http://docs.aws.amazon.com/IAM/latest/UserGuide/roles-assume-role.html

By setting the ``AWS_ROLE_BASED_CONNECTION`` to ``True``, and configuring your AWS instance with the proper role, you won't need to put in AWS credentials.

I also refactored the code a bit to factorize the connection logic.