It can happen that build operations are still running when the cleanup
of ResourceTests tries to empty the workspace. This is particularly the
case if auto build settings were changed within the executed test.
This change fixes two problems related to build operations executed
during teardown:
1. It ensures that cleanup in ResourceTest waits for builds to be executed
before deleting contents of the workspace
2. It ensures that
ParallelBuildChainTest.testWorkspaceParrallelBuildCurrentProject
properly waits for a build-triggering job to be running before joining
it