Json changes

Prepares the way for the new JHM implementation

Adds some helper functions to \<base/json.h>. Also improves performance considerably by reducing the number of copies, and improves error messages slightly.

There is a slight functionality change in the Match() helper. It now is more accurate with matching things (Before it was overly greedy in eating full tokens, which would occasionally cause it to eat an important comma as well).
Why construct the string here? We are matching against known literals.