Define API endpoints with metaprogramming

This replaces the previous `command :create_xxx` helper with several other
helpers for defining RESTful endpoints. The new helpers are meant to remove
the common CRUD operation and error handling code from individual routes, and
consolidate it in one place.

In terms of concrete advantages, these new handlers allow interpolation of data
from defined routes to be included in the output of other routes. A good
example is the inclusion of Siren "action" listings -- PUT, POST, and DELETE
endpoints -- with the objects they act upon. This functionality will be added
in the next commit.
Whitespace changes