(pouchdb/pouchdb-server#38) - implement in-memory option

Rebased on top of #49 for convenience.