Fixes to communicator package as suggested by @illarionov

Fixes to communicator package as suggested by @illarionov …
* Changing context scope.
* Moving closing cursor and submitter command into ```finally{}```
* Deciding that all ```IOException``` can be temporary (reduces data discarding).
* Cleanup if gzip fails: the ```AbstractCommunicator``` has to clean up first.