libtracker-miner: Ensure proper task queues when crawling
libtracker-miner: Ensure proper task queues when crawling

 If a directory is being crawled (as for example when renaming a directory
 from an ignored name to a non-ignored one), ensure that items found during
 crawling are processed only after any other task on the same paths has
 finished (as for example when we're deleting a whole directory and all its
 contents, which take a lot of time).

 To test this, prepare a directory with tons of files inside which is
 monitored by tracker (named 'not-hidden' for example), and then:
    1. $> mv not-hidden .hidden
    2. wait some seconds (previous action should still be processing in the store)
    3. $> mv .hidden not-hidden
    4. The addition of all items found during the crawling of 'not-hidden'
       should wait until the action in step 1 is finished in the store.

 Before this patch, for each directory found during crawling we were calling
 item_query_exists() and that was returning TRUE even if it was currently
 being processed to be removed. Also, before this patch, ensuring the mtime
 cache was done querying the store, which was returning items even if they
 were also currently being processed to be removed.

hoheinzollern/tracker,outofbits/tracker,outofbits/tracker,outofbits/tracker,outofbits/tracker,hoheinzollern/tracker,hoheinzollern/tracker,outofbits/tracker,hoheinzollern/tracker,outofbits/tracker,outofbits/tracker,hoheinzollern/tracker,hoheinzollern/tracker,hoheinzollern/tracker