New code from upstream repo.

Have pulled in changes from original repo: https://github.com/socialcast/devise_oauth2_providable
Have kept their changes in case of conflicts.