Correctly search for threads, and don't use `Option.get`

JDI objects implement `equals`, we should not rely on reference equality.

This is the last instance of `Option.get` in the debugger.

Fixed #1001599.
Small improvement in ``CompletionTests`` test runner

If the test does not contain at least one occurrence of the expected marker,
fail the test.
Merge pull request #353 from dragos/issue/fix-none-get-101599

Correctly search for threads, and don't use `Option.get`
Auto delete closing character literal

Fixes #1001600
Auto delete closing string literal

Fixes #1001583
deletion of unnecessary method
Avoid workspace-wide locks when building.

There is no reason to lock the workspace when building a project. Markers already
lock the required resources, and the build should just lock the current project.

Fixed #1001631.
Merge pull request #360 from dragos/issue/fine-grained-locks-build-1001631

Avoid workspace-wide locks when building.
Fixes test about ranking of completion proposals

For this to work we need to sort (in decreasing order) the completion proposals
returned by the ``ScalaCompletions.findCompletions`` methods. This needs to be
done only during testing because the JDT Completion Proposal component already
does it for us.

Interestingly, I believe this test was actually never run because of the bug in
the CompletionTest runner that I fixed in my previous commit (SHA:
48253e8de4daab7f5288030a8628d5053937c6ee).
Do not lock the whole workspace when running the ``ProjectsCleanJob``

I noticed that the default implementation of
``ResourcesPlugin.getWorkspace().getRuleFactory().buildRule()`` returns a
scheduling rule that **locks the whole workspace**. That seems unnecessary,
hence I've changed the implementation of the ``ProjectsCleanJob`` to only lock
the projects that are about to be cleaned.
Merge pull request #355 from dotta/feature/improved-completion-test

Small improvement in ``CompletionTests`` test runner
Fixed PC race condition in semantic highlighting

I see no reason for treating Tuple/Function in ``AppliedTypeTree`` nodes any
different that any other type application. Furthermore, if you look at the two
``case AppliedTypeTree``, it looks like we don't really need the information.
All we need is **not traversing** the ``Select`` of the ``AppliedTypeTree`` if
it doesn't appear in the source code (i.e., it doesn't have a range position),
which is what I do with this commit.

Fixes #1001623
Merge pull request #358 from dotta/issue/race-condition-pc-1001623

Fixed PC race condition in semantic highlighting
Merge pull request #361 from dotta/issue/project-clean-job-should-not-lock-workspace

Do not lock the whole workspace when running the ``ProjectsCleanJob``
enable scala actions on Java projects in non-Java perspective
(cherry picked from commit 82e6b26a7262da7bc3eed045d96377740ab4942d)
Fix rename refactoring selection/tab behavior

When entering rename refactor mode,
 - the selection should not be disturbed
 - tabbing should cycle through all instances of the symbol being refactored

This is the behavior of the JDT rename refactoring.

Fix #1001641
Merge pull request #362 from skyluc/issue/java-project-actions-1001597

Put changes from pr #357 in the right branch
Name the "selectFirst" argument when invoking enterLinkedModeUi
Add a quick fix to create a new class

This quick fix is available for any error that would have caused us to attempt an import completion quick fix.

Get rid of some duplication in the current quick fixes which define a set of 6 methods (getRelevance, getDisplayString, etc) with the trait BasicCompletionProposal.

I have also added an option to the AbstractNewElementWizardPage to put the created file in a folder that differs from the package, which is allowed in scala but not in java. The main motivation for this is so that using the new class quick fix will put the created class in the same directory as the class you were attempting to use the missing class from. This only applies when your code is in a folder that doesn't match the package, otherwise we default to the java convention of using a folder path that matches the package name.
It would be a little bit nicer to have the folder displayed as "com/some/thing" rather than "com.some.thing", but it turns out to be a lot of work: you would have to create a new CompletionProcessor to replace JavaPackageCompletionProcessor, make the UI for it to replace what comes with NewTypeWizard.choosePackage, set up the key binding so that autocompletion kicks in on '/' rather than '.', and the easy part of replacing '/' (or File.separatorChar) with '.' and coercing it in to an IPackageFragment when we need it.

Fixed source formatting of QuickFixesTests, and moved the actual test to a separate file. With the exception of renaming withQuickFixes to withManyQuickFixesPerLine, none of that code was changed, only the formatting.

Fix #1000809, Re #1000898
Merge pull request #363 from pelotom/rename-refactoring-fixes-1001641

Fix rename refactoring selection/tab behavior