Make arguments in the body json, not form data.

This change is transparent from the perspective of an API server, but
clients will have to be adjusted to send parameters in the new format.

The docstrings have been updated to reflect the change in format --
refer to them for more information.

This also adds a dependency on the schema library. This is overkill for
what we're using it for so far, but the plan is to allow the user to
supply custom schemas for their api functions.

This patch also adds a test to check arguments in the body.
Handle invalid input more carefully.

In particular, catch the relevant exceptions thrown by the json parser
and schema.

This also adds a handful of related tests.
Merge remote-tracking branch 'moc/master' into json

Conflicts:
	moc/rest.py
Remove request body length checking logic.

The right way to do this is to have a proper webserver handle this, and
put the haas behind it. This fixes an issue where if the request was too
small, the server would block indefinitely.
Fix a spelling error in the tests.

Thanks, @ryabouza.
Fix an inconsistency in the docstring for rest_call.
Merge pull request #2 from zenhack/json

Make arguments in the body json, not form data.