Implement a statistics HTTP server

It isn't quite clear what's happening to the vector's size here, and why - could you add a comment explaining?