json renovation

json stuff:
Headline feature: variadic and type-sensitive .get and .set methods.  There's something more elegant lurking underneath, as we discussed offline, but I haven't put it together yet, and this interface is useful as is.
We can't use "const" properly, esp. at the json_ptr level (jansson pointer), so just drop it there.
I've got a better idea of how to do template metaprogramming, so do so in the cast features.
Other misc small cleanups.