Handle socket errors from statsd

Really closes #167 now, with testcase guarding it.
Implements the handler by logging an error.
Repeated errors (there can be up to 60 for a single request) are
logged only once every second ("last message repeated N times").