Revert "Do not lock the whole workspace when running the ``ProjectsCleanJob``"

When performing a project's clean (i.e., via
`project.build(IncrementalProjectBuilder.CLEAN_BUILD, monitor)), the whole
workspace gets lock. Therefore, the `ProjectsCleanJob` needs to make sure to set
a rule to lock the whole workspace when creating the `Job`, or an
`IllegalArgumentException` will be thrown during the call to `project.build`.

It turns out that the call to `ResourcesPlugin.getWorkspace().getRuleFactory().buildRule()`
actually does the right thing, i.e., it creates a rule that locks the whole workspace.

This reverts commit 24ec637983d4afa24de23f91edcd353b6204bf35.

Fixed #1001658
Added test to demonstrate correct locking when running `ProjectsCleanJob`

The test is unfortunately rather cumbersome, but it does only pass after
reverting the commit SHA: 24ec637983d4afa24de23f91edcd353b6204bf35 (which
has been done in the previous commit).

The reason why the test isn't clean is that I couldn't find a simpler way
to be notified of 1) when a project's clean is finished, and 2) when an
uncaught exception occurs within a `Job`. If you happen to know a better
way to deal with it, please do contribute it.

Re #1001658
Merge pull request #396 from dotta/issue/project-clean-should-lock-workspace-1001658

Issue/project clean should lock workspace 1001658