Add capability check for gerrit stream connection

Capability for gerrit stream connection is tested as follows:

* NG: End of stream has been reached without any data
* OK: data is arrived
* OK: End of stream is not reached until timeout

This patch adds capability test to doTestConnection() according to the
above policy.