Clean projects in a background job when project settings' change

Cleaning the projects in the UI Thread was causing UI freeze. The
fix is really simple: clean the projects in a background job.

Note: The implemented solution is inspired by the Eclipse
      ``CleanDialog`` component.

Fixes #1001527
(cherry picked from commit aec8edd4136ff82d9a81860b4f7002f5f4e4f6c4)
Merge pull request #325 from dotta/backport/3.0.x/project-settings-should-not-trigger-rebuild-in-ui-thread-1001527

[backport] Clean projects in a background job when project settings' change