`/project/:project_id/doc/:doc_id/deleted` responds with:
- 404: the doc does not exist
- 200 and body `{"deleted":true}`: doc exists and is deleted
- 200 and body `{"deleted":false}`: doc exists and is not deleted
There is a minor opportunity for optimizing the mongo call(s) for
archiving: we should include `{ inS3: false }` in the queries instead
of filtering locally. It's been like that for years now, so it can
stay a little longer.
Resolve the getCollection Promises once and store the result in a shared
`db` object which can get imported by all the call-sites.
The http server is starting only after a Promise of `waitForDb()`
resolves. This covers the app code and the acceptance tests.