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
Merge pull request #127 from frankosterfeld/work/125

Clean up SQLite connect error handling