Revert "Revert "Merge pull request #67 from rinrinne/connection-changes""

This reverts commit fc90b772c2f2b28bcb804a1636349e30e1bdd16b.
Direct reference for volatile variable

When a function is called to get value, it is passed via call stack.

For shutdown flag, It should be replaced to direct reference
because it is volatile variable.
Fix boolean bug
Improve GerritConnectionTest

To Handle connection correctly, listener is used effectively.
Merge pull request #70 from rinrinne/connection-changes

Fix shutdown flag handling