Unbreak writeback
The tracker-miner-fs query to determine if there is data out of Tracker's graph that should be written back involves 2 nested selects on the tracker_triples virtual table, where the innermost one would cut short the entire query early.
These fixes make the cursor in the innermost query able to restore to a pristine state so multiple evaluations may happen.
Closes: tracker-miners#55 (closed)