libtracker-miner: Fix race which resulted in files being queued out of order
The TrackerFileNotifier signals need to be emitted in a heirarchical order. If we have this directory heirarchy...
test-monitored/
test-monitored/file1.txt
...we must always emit ::file-created for 'test-monitored/' before we emit ::file-created for 'test-monitored/file1.txt'.
The tracker_file_notifier_ensure_parents() function ensures that we do this, but it would previously not work correctly in situations where 'test-monitored/' was a configured indexing root, rather than a subdirectory of one of the roots.
This was causing the tracker-miners functional tests to randomly fail with errors such as this:
** (tracker-miner-fs:18181): WARNING **: 16:01:00.461: Parent 'file:///home/sam/tracker-tests/tmpDSmsQI/test-monitored' not indexed yet
This is presumably a regression from 2e2dd4f5.