Move to CouchDB as a backend

CouchDB already has a lot of momentum in this area, and it's our
eventual goal anyhow. Syncing over a dumb server is going to require
lots of inefficient traffic, but I think it can be made safe, at
least.

Some conversion isn't complete -- Message should really just be called Document or deleted.

This also introduces a pytest plugin to manage temporary CouchDB
instances, which isn't complete and is anyhow cribbed from pytest's
tmpdir handling.