libtracker-data: Guard against failure to open the database

An error from sqlite3_open_v2 will lead to a failure to create a
TrackerDBInterface. This means that DBManager.get_db_interface will
fail.

https://bugzilla.gnome.org/show_bug.cgi?id=738450
libtracker-data: Guard against invalid statements in public API

https://bugzilla.gnome.org/show_bug.cgi?id=738450