Fix MINUS support
From the main commit:
libtracker-data: Fix MINUS support
We used to implement MINUS through sqlite's EXCEPT, which requires
SELECTS on both sides of the operation to have the same variables in
the same order.
This restriction is a bit inconvenient to us, since we need to cater
for full/partial/empty variable set matching. It is not feasible to
make all combinations go through the EXCEPT restrictions.
Instead, make MINUS use SQLite row values syntax feature
(https://sqlite.org/rowvalue.html), in order to match full and partial
variable set matches the same way.
The use of EXCEPT is now relegated to situations where variables on left
and right side do not intersect (e.g. { ?a ?b ?c } MINUS { ?x ?y ?x }),
and purely out of convenience.
It is worth noting that variables only defined on the right hand side
do not propagate outside of it (eg. cannot be queried in the upper SELECT).
Closes: #190 (closed)