Refactor use of SearchFailure in implicits.

Introduces AmbiguousSearchFailure to go with the
the existing SearchFailure, and changes predicates
to use `SearchResult.{isFailure, isSuccess}`.

This doesn't change behaviour; it is a preparatory
commit for SI-6667.
Fix for SI-6712, bug in object lifting.
SI-6667 Abort after any ambiguous in-scope implicit

Rather than continuing on to a search of implicits
of the expected type.

Previously, the companion implicits were searched if the
the caller was running the implicit search in silent
mode, for example if searching for an implicit parameter
in an application which has an expected type.

After this commit, the behaviour is consistent, regardless
on silent/non-silent typing.
SI-5678 Bad return type for [Use Case] docs in Range

Many [Use Case] example in Range such as the one associated to the union method document that the method returns a Range which is just plain false.

Example:

val ran1 = Range(1,3)
val ran2 = Range(54, 57)
val result = ran1.union(ran2) // This is a perfectly valid use case yet obviously cannot be represented as a Range
Fix typo in documentation for Seq
Javap for Java 7 (Fixes SI-4936)

Add support for reflective invocation of javap under jdk7,
using the quasi-javax.tools API.

Under -Ygen-javap, warn if you can't.

Since JAVA_HOME is used to locate tools.jar, the script is
updated to convert it for cygwin.

Update Javap for simpl repl.

Also, reduce clutter of JavaxTools as suggested.

JavapTool7 evades repl truncating if enabled; the truncating PrintWriter
is not line-oriented but string-oriented.
SI-4664 Make scala.util.Random Serializable
SI-6631 Handle invalid escapes in string interpolators

Patch contributed by Rex Kerr.
Fix Scaladoc for the raw interpolator.

The comment about unicode escaping fell into
the very same trap that it was warning about.
Fixes SI-6558: typecheck lazy annotation info using non-silent context.

Make context for typing lazy annotations always non-silent. If lazy annotation info was created in local (silent) context, error could go unnoticed because later they would still use silent typer for typing the annotation.
SI-6558 Expand test case for annotation typos
SI-6547: elide box unbox pair only when primitives match
Javap for repl output.

The enabling fix is in AbstractFileClassLoader: the javap tool
uses a ScalaClassLoader to pick up tools.jar, but delegation to
the parent AbstractFileCL was broken; minimal support for findResource
was added.

Other minor tweaks to output: retain the weird "Binary file...
contains" message as documentation; the message is not output for
:javap $line3/$read$$iw$$iw$Foo.class, for example.

No option handling by javap-7 except to catch IllegalArg, so that
combined arg style is not yet supported (:javap -pv).
Split test case to workaround incomplete error report.

Reporting some errors prevents reporting others. This
residual issue had been lodged as SI-6758.
SI-6549 Improve escaping in REPL codegen.

 - Escape the LHS of an assign when printing results
   - e.g. X("").foo = bar
 - Escape val names
   - e.g. val `"` = 0`
SI-4664 [Make scala.util.Random Serializable] Add test case
SI-6535 Step back from the precipice of a cycle

Adding any non-local parent to WrapAsScala will trigger a valid
cyclic reference error. By moving the import of `Wrapper._`
inside `WrapAsScala` and `WrapAsJava`, it is not in scope when
typing the parents of those, and we avoid the cycle.

Adds a test case to show the essense of the promiscious mutual
imports that triggers this.
Adds debug logging for synthetic registration.

Investigatory tools for SI-5877
SI-5877 Support implicit classes in package objects

This used to crash, as both the package and the package object
had the synthetic method in `decls`, and the typer tried to add
the tree to both places.

Now, synthetics in the package object are excluded from the pacakge
itself.
tests for idempotency issues in the typechecker

For more details see https://issues.scala-lang.org/browse/SI-5464.

Check files are intentionally very precise, so that we can monitor
how the situation changes over time.