Implement a statistics HTTP server

The indenting here got weird :-) and should be instead like the indenting on lines 171-173.