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
I wondered, too, it doesn't like nice. My thought was that we'd rather want to catch it here if something else goes wrong. Which would be unexpected at any rate but so was the original bug.