Fixes #8: connection leak when the response is terminated unexpectedly

Changed connection close/release strategy to support unexpected request
terminations.