Keep the network connection open across function calls

Connecting and disconnecting all the time isn't very efficient and might
have been the cause of recent problems reported by Anders Granlund.
Instead, keep the connection open, and instead of waiting for the server
to close the connection, only wait for an acknowledgement and then move
on.  This will probably keep the connections open a bit longer than
necessary, but that shouldn't be a huge problem given that you would
never want to run pgcov on a live environment anyway.  It's probably
possible to improve on that (by e.g. closing the connection at
transaction commit/abort), but it's not clear whether that's necessary,
and depending on when the connection is closed, it might in some cases
introduce the same problems as the previous approach.