Avoid double fetching workunits

It was possible for 2 or more threads created back to back to end up retrieving the same workunit (because the first had not yet returned and updated the list of already found files).  The pre-fetching workunit provider now checks at the point where the workunit is added to the stack of ones available to be returned.

I think this will probably fix #233.