don't be total garbage code

* I'm embarrased about the previous code, don't ask me about it
* add instrumentation (using statsd, proto1 for now)
* ... which allows to: remove various print statements
* buffer pending metrics->sql so it's non blocking (up to a max size)
  (for real this time. i didn't know how channels work earlier)
* the mysql too many sockets problem wasn't real.  only 1 connection.
perf numbers
warn for incomplete reads
fix: append newline to end of str