Fix threading tests when threads disabled
Fix refcount issues with mutex protected ignores

Some ignore files were not being freed from the cache.