Metrics http json handler redo

@syamp

redid metrics httpjsonhandler. Allows filtering of metrics written
docs and basic tests?