jsonhttp: new package

This factors out some functionality from the charm store that makes
it easier to write JSON-returning HTTP handlers, without tying
it to a specific representation of error responses.

This TODO should probably be done