Isolate connection functions from GerritHandler

Now GerritHandler handles gerrit event and gerrit connection.
Even if you want to use event handle feature only, actual connection
is always needed.
To decrease network dependency, This patch isolates connection
features from GerritHandler.