Refactor resource and route definitions

Resources and routing are now declared in the same place, with each
resource's "find" function an explicit part of its definition.

Path patterns and resources remain decoupled: a pattern maps to a list
of resource types, each of which is tried in turn.
Add logging function
Match any type in Accept

Doesn't honor quality values, but allows serving HTML to browsers.
Add some resource tests I forgot about

And build tests in a bin directory.
Add ability to set cookies in the response
Ajaxify the evens demo

  GET /app/evens/.*

now returns a static HTML file that attempts to GET /evens/... as an
AJAX request. The resource path is passed to the frontend app in a
cookie.