lib/sqlite3: update error management to be more simple use only the light FFI