Extract part of GerritGlobalModule into AuthModule

Programs that want part but not all of GerritGlobalModule currently
have to copy just the bindings they want into their modules; this is
occasionally painful but basically doable.

However, the logic for switching on the auth type is a bit too much to
copy and paste, so extract a reusable module.

Change-Id: I3dfac672919ede56f1db02bdf24de9a374335b4e
2 files changed