Fix shutdown process

shutdownInProgress is flag. It is accessed from more than 2 threads.
When read this, it has possibility not to be able to get the latest
value which was written by other threads. This is caused by Java memory
model.

To avoid this, shutdownInProgress should be declared as volatile
variable. Then all threads can read/write value to it synchronously.

As a result, brute force related code and synchronized object can be
discarded.

For keeping secure, setter for this flag is changed to no parameters.
Remove connecting flag

Now "connecting" has been used to determine whether disconnect ssh
connection. But it is not needed by devising shutdown logic.
Refactor ssh connection loop
fix notification point for connection event

Now connection established and connection down are notified to handler at
the below timing.

* ssh connection established / down
* gerrit stream-events established / down

These established/down events are notified to handler without connecton
type. It should be separated.

But now handler is mainly for stream events, so ones for ssh connection
are not needed.

So this patch stops notification for ssh connection.

In the future, it is better to implement notification for ssh connection
as new interface if needed.
Add interface to check connection status
Merge pull request #67 from rinrinne/connection-changes

Fixes for GerritConnection