Adds debug.json endpoint for the HTTP stats interface