write_graphite: Use the complain mechanism to report connection errors.

Fixes Github issue #236. Thanks to @pyr for reporting it!