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.(cherry picked from commit 359aec26f5a2e36b86ab86aae9267ad9c01584f5)
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.
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 #390 from huitseeker/2.10.2_compat

[backport] Backport #358, #360
Don't index Scala binary files for Scala special types.

Exclude classifies for
* anonymous classes (`$anonfun`)
* top-level objects (`*$.class`)
* trait imll classes (`..$class.class`)

Fixed #1001035.
Correctly locate types inside Scala binaries.

This fixes `EditorUtility.revealInEditor`, that used to handle only
top-level elements. Now `Open Type` correctly reveals (highlights)
inner elements as well.

Fixed #1000743.
Ref #1001688, #1001036, #1001037.
Only consider opened projects when computing a project's direct dependencies

When computing a project's direct dependencies, filter out non opened
projects (if a project is open it implies it exists, which is why there is no
need to check for `project.exists`).

Fix #1001714
(cherry picked from commit 784667c7b855cd603937b9a92a82c36c05341672)
Use Sbt 0.13.0-M1
Updated Tycho to v0.16.0
Removed scala-2.9.x profile as we no longer need it

* Updated scala version used by scala-2.10.x profile to be Scala
  2.10.2-SNAPSHOT, because that is the targeted Scala version for
  the master branch.
Pass default incremental compiler options.
Updated Sbt version used by the different Scala profiles

* When building for Scala 2.10.x, let's use Sbt 0.13.0-M1 artifacts
* When building for Scala 2.11.x, let's use the Sbt 0.13.0 SNAPSHOT artifacts

There is an additional catch. When building for Scala 2.10.x, the value of the
property ``sbt.version`` has a trailing ``SNAPSHOT``. Why? Becuase we are using
Scala 2.10.2-SNAPSHOT, and hence the Sbt artifacts have to be rebuilt **every
night**. In the Maven world this means that the artifacts version has to end with
``SNAPSHOT`` (there is really no way around this).

In case you decide to build for Scala 2.10.0 or Scala 2.10.1, then make sure to
pass ``-Dsbt.version=0.13.0-M1`` to the build script (no SNAPSHOT is needed
in this case because the Scala version is stable!).
Updated .classpath of ``sbt.full.library`` project

In commit SHA: 3361828b44521707f32a05b45c2f61e1ffc5f8bc the version of
Scala used to build the codebase changed. Therefore, the Sbt artifacts
exported by default need to be updated accordingly.
Bumps sbt version from 0.13.0-M1 to 0.13.0-M2.
Fixes #1001713.
Bumps versions for a number of library dependencies

log4j : 1.2.16 -> 1.2.17
jline : 0.9.94 -> 2.10
mockito: 1.9.0 -> 1.9.5
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
(cherry picked from commit ac97f1bf18633aaf725ec6477390d8a9c3def9d4)
Merge pull request #394 from huitseeker/opentype

[backport] Improve `Open Type` This is a backport of #384.
Merge pull request #392 from huitseeker/version_bump

[backport] Version bumping across the board, which should make our 3.0.x nightlies work better
Updates classpaths after #389
Merge pull request #402 from dotta/backport/3.0.x/issue/test-for-projects-clean-job

[backport 3.0.x] Added test to demonstrate correct locking when running `ProjectsCleanJob...