Implement a statistics HTTP server

Formula is wrong, it should read `sum += i->avg * i->count`