Refactor metrics package to improve performance.

There were two problems with this package affecting performance:

* Excessive usage of fmt.Sprintf that was slowing things down
* Packet sent per every metric, what was generating too many system calls

This refactoring adds option for buffered writes as well as uses bytes.Buffer and avoids system calls.

Here's the micro benchmark:

https://gist.github.com/klizhentas/300e19bbada120db2454

Now it gives 900,000 metrics per second on my laptop.