write_graphite plugin: Actually check the return value of wg_send_message().

Assignment to "status" was missing.
write_graphite plugin: Don't call close() on invalid file descriptors.
write_graphite plugin: Don't call close() on invalid file descriptors.
src/plugin.c: Free the "data_sets" AVL tree.

This pops up every time I investigate memory leaks and it's annoying me.
Merge branch 'collectd-5.2' into collectd-5.3