Implement a statistics HTTP server

This upcast/downcast should not be necessary, the base class needs to be redesigned.