Bulk data API functions

This alters the API functions to accept multiple entities as parameters with optional check lists, and tweaks the output data to be more consistent. It's been integrated in as an extension to the current routes, so old API clients should still work properly.

A new version of the API.md documentation is at https://gist.github.com/ali-graham/ff15c507e7ba76e1ba13 (I stopped maintaining a separate fork of the doc submodule, it was introducing too many conflicts in commits).

See #123.