Sync 'isDefined' in presentation compiler cache.

This fixes one race condition when hyperlinking between
projects. Project 'client' depends on project 'base'.
The sequence of events was:

- dependent project 'base' starts building
- the indexer for `client` kicks in and starts the PC. The PC is not
  yet initialized. PC starts without `base` classfiles on its class path
- `base` finished building and triggers a reset of the PC for `client`,
  that normally restarts with `base` classfiles on the class path
- reset is ignored (PC is still starting, and `isDefined` returns false)
- hyperlinking fails, because the target is not available on the class path
Updated sbt.version to 0.13.0-RC5
(cherry picked from commit e1815ed519ab93abaf35b514331af0a6fcc54a87)
Merge pull request #490 from huitseeker/fix/race-condition-cached

[Backport] Sync 'isDefined' in presentation compiler cache.
Made `ScalaSourceFile.createFromPath` implementation thread-safe

The former implementation of `ScalaSourceFile.createFromPath` was not
thread-safe, which was problematic because the method is called concurrently
from different threads. The actual reason for the race-condition is that
`HandleFactory` is not thread-safe. (Side note, this is why  I was keeping
getting "Resource XXX does not exist." exceptions while reviewing scala-search
PR #68).

The fix consists in making sure that no `HandleFactory` instance is shared
across threds. One relevant point is that `HandleFactory` performs caching for
speeding up retrieving an `Openable` from a `path` (the caching is the actual
reason why the class isn't thread-safe). This is an important aspect to keep in
mind, and which should motivate the implemented fix.

I could see two possible ways to fix `ScalaSourceFile.createFromPath`:

1) Create a fresh instance each time (and also provide an additional method to
allow callers to explictly pass  a `HandleFactory` when they know the instance
isn't shared among threads).

2) Delegate the responsability of never sharing `HandleFactory` instances among
threads to a `ThreadLocal`.

Option 2) seemed to be the best fix, because

* correctness is ensured by design,
* no changes are required from the caller, and
* it maximize opportunities for re-using the cache maintained by `HandleFactory`.

Last but not least, the fix is both source and binary compatible. However,
``ScalaSourceFile.handleFactory`` is now deprecated, as I believe it was public for
historical reasons.

Fixes #1001846
(cherry picked from commit 82f0809e63e8f86ecd26c7bcdd7c190a6f9952ac)

Conflicts:

	org.scala-ide.sdt.core/src/scala/tools/eclipse/javaelements/ScalaSourceFile.scala
Merge pull request #506 from dotta/backport/pr/505

Backport/pr/505