raco setup: create docindex database before trying to read

Commit 0f80c71fab propagates read-only mode so that a documentation
database is not created for read operations, but `raco setup` (with
documentation-index support) attempts to read the database before
writing to it. Change `raco setup` to make sure the database
exists if a later write operation is expected to create it.

Merge bug fix to v6.0 (pending review)