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)
Can you follow the same convention and replace underscores with camel cased variable names, e.g. `toCommit`