Clean up SQLite connect error handling

Do not assert on broken setup such as non-writable paths.
Try to always return a sensible error message.

Also avoids infinite connection fail/reconnect loops in release mode
when the configured database path can't be written to.

Fixes #125