Refactor OAuth refactorings to CE
Merge branch 'feature-oauth-refactoring' into 'master'

Feature oauth refactoring

same MR as gitlab/gitlab-ee!188

See merge request !1169
Merge branch 'master' of github.com:gitlabhq/gitlabhq