Add rolling histogram and factor out anomaly detection

`golint`:

    histogram.go:47:9: should omit 2nd value from range; this loop is equivalent to `for i := range ...`