Respond to HEAD requests

When responding to a HEAD request all the database work is done,
but serialization isn't, saving a bit of CPU.

Fixes #41
Also handle 405 response headers correctly for other request types

Fixes #37