Simplified json_api module.

API commands are only accepted at the documented /api path, also removing the need to redirect to the root after posting (which was there to ease manual typing/posting solutions).