lib: Make notmuch_database_find_message_by_filename not crash on read-only databases