Added rudimentary networking.

There's way more traffic than there needs to be at the moment because
everything is sent as JSON, but that makes it really easy to make the
server and client talk to each other.