Added support for UPD/TCP communication to graphite

Graphite communication is now configurable to be either tcp or udp.
An attribute is added to the <graphite /> configuration tag that decides whether to use UDP og TCP when sending data to graphite.

Also includes a bug fix which adds a "\r\n" after each line sent to graphite in both UDP and TCP. The UDP part is untested though.
I agree, it can be pretty tricky. One way is to poll the socket before each send at the cost of performance and there is still no guarantee that the connection is alive.
I'm guessing it should enter some kind of retry state if the send fails.
You're more than welcome to begin on this. I'll take a look at the others later this week.