Graphite fixes3

this is an updated version of https://github.com/influxdb/influxdb/pull/488

* did a rebase after the udp graphite stuff got merged
* a few bugfixes (for the commit-batches code, the current code in master has no bugs that i know of)

i have to test again to make sure, but i think it still performs worse than the original code (just like the 2 previous graphite-fixes PR's)
How does this loop ever break ? It looks like we will never get to the `wg.wait()` line. Did I miss something ?