hg2json.py: add rule and span to json output