That will issue an update of all tables, so the FTS view might be
affected. This is not caught by ontology change tests, as this
is a situation that can only happen when migrating from 1.x databases
ATM.
(cherry-picked from 70758fc0)

Sqlite >= 3.25.0 got stricter 'alter table ... rename ...' behavior
where the renaming affects all references to the table across the
database. This is at odds with our fts_view view on schema updates
due to ontology changes, as we first migrate (rename current table,
create new one, insert previous content, drop old table) all resource
tables before doing the FTS table/view updates. This causes rename
failures due to the fts_view referencing the renamed and dropped
tables.
Change the ontology update code so we delete the FTS table/view
before changing resource tables in case of FTS updates. This makes
the behavior correct both before and after the Sqlite change.
#40

Both libtracker-fts and libtracker-data end up requiring includes
from tracker-sparql.h, but we have to generate tracker-generated.h
first.
It's pretty terrible to add intermediate targets as a dependency
outside the libtracker-sparql directory, but it doesn't seem we
can do better.
Closes: #52

The docs were not going through gtkdoc-scangobj, and the libtracker-sparql
docs were just looking in source dir while it should also look for gtk-doc
comments in generated files from vala.
Now that we're there, use include_directories() to get rid of relative
paths.

Even though libtracker-data uses types from libtracker-sparql, this
is the wrong way around. However, doing the right thing here still
breaks because meson is playing smart here and passes --no-undefined
for every shared library by default, so build breaks with obviously
undefined symbols.
Correct the dependency tree to be exactly how it was with autotools,
and override b_lundef when building libtracker-data to leave the
borrowed symbols undefined. The gaps will be filled in because
everyone must link with libtracker-sparql.
Closes: #44

Following https://www.bassi.io/articles/2018/03/15/pkg-config-and-paths/,
this includes dbus service, bash completion, gir and typelib paths.
Unfortunately, the path for systemd user units cannot be overriden, so
use a path made from our libdir path.
This allows for trouble free builds by just defining prefix. If installing
onto system paths was desirable on some setups, it might return through a
-Duse_system_paths boolean build option that disables the overrides, but
this is a preferrable default.

And let it shut down the internal data manager. Fixes possible crashes
as the TrackerDirectConnection is not disposed and there may be other
internal threads trying to access the TrackerDataManager after shutdown.

This query would deduplicate files by their matching rdf:types, which
may possibly return the same file multiple types if the file as
several types that satisfy the query. Group by the URN so we only get
each element exactly once.

On one hand, the refcounting assignment was wrong, the task callback
is meant to receive a reference on the TrackerTask where it was
getting none.
On the other hand, after fixing it there is a circular reference
between the GTask and the TrackerTask that would prevent both to
be freed, break it by disposing the GTask as soon as it's dispatched.

This code had several wrongs here:
- The tracker_file_system_is_file_interned got the check_fs
parameter wrong, creating an additional copy of the file.
This would be inocuous as the later lookup would succeed,
except
- The extra copy of the file was being leaked
- And actually the later lookup is somewhat superfluous if
we are checking the NodeLookupData. We can shortcircuit
lookup of files already interned in this TrackerFileSystem
even further.
This all is fixed now, the tracker_file_system_is_file_interned()
function got open coded in the caller function so we can perform
the fast path, the check has been corrected, and even if we would
fall through the paths that do need a copy, it wouldn't be leaked.

We unparented children on intermediate folders, but didn't handle the
case of the root folder disappearing. Unparent the child nodes so
they get correctly freed when the respective GFiles are disposed.