Fixes to communicator package as suggested by @illarionov

Changing context scope.

Moving closing cursor command into ```finally{}```

Deciding that all ```IOException``` can be temporary (reduces data discarding).