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).
I'm not sure that there is any difference here. It's a move-ctor in-place either way, isn't it?