Implement API non-RESTful format, JSONP, CORS

Fixes #53.
I didn't want to use `else if` since the effect is the same, and no harm in test code checking more things, but you bring up a good point with `else` — we need to be checking for none of these things being there. Thanks, will fix.