Fix issue #430 where write_graphite fails to reconnect

If LogSendErrors is set to false and protocol is tcp, the socket file descriptor was not getting reset to -1, and thus the tcp connection is never re-established if the remote end goes away. This pull requests fixes that problem, as described in issue #430