Fix race when the database did not exist before starting.

Fix race when the database did not exist before starting.

The issue is a race for the auto-creation of the db file dbs.couch between async spawns in the code path of `mem3_shards:init/1` and `mem3_sync:initial_sync/1`. Both use `mem3_util:ensure_exists/1`, in parallel and find that the database does not exist. When trying to create it, one looses out and receives `file_exists` back from `couch_server:create/1` via `mem3_util:ensure_exists`. instead of expected `{ok, Db}`.

Thus a crash then occurs either here: https://github.com/cloudant/mem3/blob/8ca09068a4173b78c0fb5f77017827b45bb3b050/src/mem3_shards.erl#L120

or here: https://github.com/cloudant/mem3/blob/8ca09068a4173b78c0fb5f77017827b45bb3b050/src/mem3_shards.erl#L224

There is no immediate consequence for `mem3_sync:initial_sync/1` to crash, as the sync attempted is simply re-attempted immediately after receiving the `DOWN` from the worker process in `mem3_sync_nodes:handle_info(..DOWN..)` and then probably succeeds.

There is also no immediate consequence from a crash in the `mem3_shards:init/1` code path but it looks like it may result in `mem3_shards` having no change listener, and have a dead pid in its state's `#st.changes_pid`, originally created here: https://github.com/cloudant/mem3/blob/8ca09068a4173b78c0fb5f77017827b45bb3b050/src/mem3_shards.erl#L147

Tests for this PR are in dbcore/37960-db-creation-race, see git log there, `make check`.

BugzID: 37960
wherever a caller cares about the result from ensure_exists they invariably do `{ok, Db} = ...` anyway, so this is just moving where the badmatch occurs in the event of a failure. I think it's more important to catch when ensure_exists fails to ensure the db exists than preserve behavior. This will only happen if db is deleted between the `create` and `open`, and we'd definitely want to crash in that case.