Start of client support stuff

The server side now has support for JSON responses and has the
ability to post stuff via a REST interface. /new will now
accept both web sessions and a RESTful posting.
There's a little bit of client support done, but the client
script will not actually do anything yet.