Fix SI-6578. Deprecated `askType` because of possible race conditions in type checker.

AskType triggers type-checks the given source and returns a typed tree. If that
source is already loaded (a precondition), the background compilation loop may actually
be compiling that same source. The new type checker run may then get into an inconsistent
state and try to add twice the same synthetic members, like `canEqual`.

Most of the times, `askLoadedTyped` (that waits for the type checker to finish, and
returns the most recent typed tree) *is* the right way to go.

Removed occurrences of the deprecated method in tests and interactive.REPL.

@reviewby @huitseeker,@odersky
SI-7008 @throws annotations are now populated in reflect

Runtime reflection in JavaMirrors previously forgot to fill in
@throws when importing Java reflection artifacts. Now this is fixed.

Note that generic exception types used in `throws` specifications will
be garbled (i.e. erased), because we don't use `getGenericExceptionTypes`
in favor of just `getExceptionTypes` to stay compatible with the behavior
of ClassfileParser. That's a bug, but a separate one and should be fixed
separately.

Also note that this commit updated javac-artifacts.jar, because we need
to test how reflection works with javac-produced classfiles. The sources
that were used to produce those classfiles can be found in the jar next
to the classfiles.
evicts javac-artifacts.jar

Apparently, the usual _1, _2, _3... naming scheme also works for java
files, which need to be compiled together with partests. This allows us
to get rid of javac-artifacts.jar.
SI-7039 unapplySeq result type independent of subpattern count

Fixes a bug in the implementation of the `unapplySeq` part of the spec below.

An `unapply` method with result type `R` in an object `x` matches the
pattern `x(p_1, ..., p_n)` if it takes exactly one argument and, either:
  - `n = 0` and `R =:= Boolean`, or
  - `n = 1` and `R <:< Option[T]`, for some type `T`.
     The argument pattern `p1` is typed in turn with expected type `T`.
  - Or, `n > 1` and `R <:< Option[Product_n[T_1, ..., T_n]]`, for some
    types `T_1, ..., T_n`. The argument patterns `p_1, ..., p_n` are
    typed with expected types `T_1, ..., T_n`.

An `unapplySeq` method in an object `x` matches the pattern `x(p_1, ..., p_n)`
if it takes exactly one argument and its result type is of the form `Option[S]`,
where either:
  - `S` is a subtype of `Seq[U]` for some element type `U`, (set `m = 0`)
  - or `S` is a `ProductX[T_1, ..., T_m]` and `T_m <: Seq[U]` (`m <= n`).

The argument patterns `p_1, ..., p_n` are typed with expected types
`T_1, ..., T_m, U, ..., U`. Here, `U` is repeated `n-m` times.
SI-7033 Be symful when creating factory methods.

Implicit class factory methods were synthesizing the
reference to the class as `Ident(classDef.name)`, which
was unhygienic in case of `implicit class X[X]`.

To use symbols without causing a cycle, I switched from
`REF(symbol)` to `Ident(symbol)`. The former calls into:

    at scala.reflect.internal.TreeGen.mkAttributedSelect(TreeGen.scala:184)
    at scala.reflect.internal.TreeGen.mkAttributedRef(TreeGen.scala:124)
    at scala.reflect.internal.TreeGen.mkAttributedRef(TreeGen.scala:130)
    at scala.tools.nsc.ast.TreeDSL$CODE$.REF(TreeDSL.scala:307)

which forces the info of enclosing module and forms a cycle.
SI-6017 Generate Scaladoc's index links in Scala side

There is no reason to do it in JavaScript.
SI-6017 Scaladoc: Show all letters without dangling links

Use <span> instead of <a href="..."> if there is no page on the letter.
Revert "SI-6422: add missing Fractional and Integral alias in scala package"

This reverts commit c6866a28faf67cd2e455f9a0a829859a73e38819 because it adds two
members to the API and so breaks forward binary compatibility.

Attention: this is only intended for 2.10.x, not for 2.11.
SI-5833 Fixes tail-of-Nil problem in RefinedType#normalizeImpl

RefinedType#normalizeImpl was checking to see if the flattened list of
parents had an empty tail then pulling the head if so. But if the list
was empty then boom. This fix makes it check if the whole list has
length 1 instead. Empty lists will flow through to the rest the logic
which has no problems with Nil.
[nomerge] SI-6667 Demote a new ambiguity error to a lint warning.

In the interests of not breaking source compability.
A few projects are relying on this bug.

Should not be merged to master.
pullrequest feedback

https://github.com/scala/scala/pull/2040
reflecting @throws defined in Scala code

As per Jason's comment: How are Scala classes containing @throws annots
treated? I can't figure out whether we pickle the annotation in addition
to adding the exception to the signature. If we do, might we end up with
duplicate annotations in runtime reflection? This warrants a test.
See the context of the discussion here: https://github.com/scala/scala/pull/2040/files#r2874769.

No, we won't end up with duplicates, because classes defined in Scala
are loaded in a different completer. But I'll add a test - you can never
have too many of those.
Merge pull request #2060 from Blaisorblade/topic/2.10.x-fix-bc

Revert "SI-6422: add missing Fractional and Integral alias in scala package"
Merge pull request #1992 from retronym/ticket/7033

SI-7033 Be symful when creating factory methods.
Merge pull request #2040 from scalamacros/ticket/7008

SI-7008 @throws annotations are now populated in reflect
Merge pull request #2048 from dragos/issue/fix-SI-6578

Fix SI-6578. Deprecated `askType` because of possible race conditions in...
Merge pull request #2050 from kzys/jira-6017-v2

SI-6017 Scaladoc: Fix dangling links on index.html
Merge pull request #2063 from retronym/ticket/6667-2.10.x-revert

[nomerge] SI-6667 Demote a new ambiguity error to a lint warning.
Merge pull request #2062 from JamesIry/2.10.x_SI-5833

SI-5833 Fixes tail-of-Nil problem in RefinedType#normalizeImpl
Merge pull request #2051 from adriaanm/ticket-7039

SI-7039 unapplySeq result type independent of subpattern count