Fix crash with "Files in Any/Current Project" locator filters

They were calling thread-unsafe API from a non-GUI thread.

Task-number: QTCREATORBUG-12592
Change-Id: I029eebae341643060ca1d1a685e2a5730f9cf964
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>