SI-7290 Discard duplicates in switchable alternative patterns.

The pattern matcher must not allow duplicates to hit the
backend when generating switches. It already eliminates then
if they appear on different cases (with an unreachability warning.)

This commit does the same for duplicated literal patterns in an
alternative pattern: discard and warn.
Expand test for SI-6124 to demonstrate cause of SI-7285.
SI-7285 Fix match analysis with nested objects.

The fix for SI-6146 introduced `nestedMemberType` to
enumerate sealed subtypes based on the (prefixed) type
of the scrutinee and the symbols of its sealed subclasses.
That method needed to widen `ThisType(modSym)`s to
`ModuleTypeRef(modSym)` before calling `asSeenFrom`.

However, this could lead to confused in the match analysis,
which sees `ModuleTypeRef` as distinct from singleton types
on the same modules (after all, they aren't =:=). Spurious
warnings ensued.

This commit makes two changes:

 - conditionally re-narrow the result of `asSeenFrom` in `nestedMemberType`.
 - present `a.b.SomeModule.type` as `SomeModule` in warnings emitted
   by the pattern matcher.
Correct sorting example for Ordering in scaladoc

	Below code snippet,
    Sorting.quickSort(pairs)(Ordering.by[(String, Int, Int), Int](_._2)

    should be
    Sorting.quickSort(pairs)(Ordering.by[(String, Int, Int), Int](_._2))
SI-6168 Retain prefix when parsing types in JVM signatures

When reading Java classfiles, the generic signatures are
used to construct the corresponding Scala type signatures.

In the enclosed test case, the field `SomeClass.f` had
the JVM signature:

    LContext<LSomeClass;>.Field<Ljava.lang.Integer;>;

The parser first (correctly) parsed the prefix as `Context[SomeClass]`.
It then looked up the type symbol for `Field` in that that type. It then
discarded the parsed prefix, and instead used the prefix from the
info of the type symbol: `Context[ParentType]`.

This commit changes the signature parser after the first `.` to
use the result of prior parsing as the prefix.

I've also included a test case with Java static inner classes,
which don't require any special treatment.
SI-6387 Clones accessor before name expansion

When a symbol's name is expanded due to a conflict during
composition (e.g. multiple traits with same-named members, but
which are not both visible at the language level in the concrete
class) the compiler renames some symbols with expanded names which
embed the full name of the declaring class to avoid clashes.

In the rare cases when the accessor overrides the member in base
class, such expansion either results in AbstractMethodError when
the base method is abstract, or, even worse, can change the
semantics of the program.

To avoid such issues, we clone the accessor symbol, clear its
ACCESSOR flag and enter the symbol with an unchanged name.
restored dependency of pack.done on quick.bin
run test.bc as part of tests on 2.10.x

also added test.bc-opt target as binary compatibility differs between (non)optimized builds...
remove unused ant targets: test.ant, test.classload, test.positions
Formatting. Introduce {asm,forkjoin,fjbg}-classes props.
Remove duplication in java builds of fjbg/asm/forkjoin
Preparation for faster PR validation

Added starr.number, so that `ant -propertyfile starr.number -Dlocker.skip=1`
works across branches.

Introduced target `test.core`, which skips `test.stability`, since that requires
`locker == quick`, whereas `locker == starr` with the above settings.
(It's interesting to see for which files it fails when that assumption is broken.)

Stability will still be tested on a nightly basis. It's rarely broken.
Let continuations library sources determine docs.lib's actuality
SI-7232 Fix Java import vs defn. binding precendence

Java Spec:
> A single-type-import declaration d in a compilation unit c
> of package p that imports a type named n shadows, throughout
> c, the declarations of:
>   - any top level type named n declared in another compilation
>     unit of p
>   - any type named n imported by a type-import-on-demand
>     declaration in c
>   - any type named n imported by a static-import-on-demand
>     declaration in c

Scala Spec:
> Bindings of different kinds have a precedence deﬁned on them:
>   1. Deﬁnitions and declarations that are local, inherited, or made
>      available by a package clause in the same compilation unit where
>      the deﬁnition occurs have highest precedence.
>   2. Explicit imports have next highest precedence.

This is a forward port of 6e79370, which did not merge cleanly
and was omitted in the regular merge from 2.10.x to master.

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
SI-7259 Fix detection of Java defined Selects

The fix for SI-3120, 3ff7743, introduced a fallback within
`typedSelect` that accounted for the ambiguity of a Java
selection syntax. Does `A.B` refer to a member of the type `A`
or of the companion object `A`? (The companion object here is a
fiction used by scalac to group the static members of a Java
class.)

The fallback in `typedSelect` was predicated on
`context.owner.enclosingTopLevelClass.isJavaDefined`.
However, this was incorrectly including Select-s in top-level
annotations in Scala files, which are owned by the enclosing
package class, which is considered to be Java defined. This
led to nonsensical error messages ("type scala not found.")

Instead, this commit checks the compilation unit of the context,
which is more direct and correct. (As I learned recently,
`currentUnit.isJavaDefined` would *not* be correct, as a lazy type
might complete a Java signature while compiling some other compilation
unit!)

A bonus post factum test case is included for SI-3120.

Manual forward port of f046853 which was not merged as
part of the routine 2.10.x to master merge. The test case
uncovered a NullPointerExceptiion crasher in annotation
typechecking introduced in 5878099c; this has been prevented
with a null check.

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
SI-6793 Don't use super param accessors if inaccessible.

"Alias replacement" has been with us since 2005 (13c59adf9).

Given:

    package a {
      class C1(val v0: String)
      class C2(v1: String) extends a.C1(v1) { v1 }
    }

The reference to `v1` is rewritten as `C2.super.v0()`, and
no field is generated in `C2`.

(Oddly, this optimization doesn't seem to kick in if
these classes are in the empty package. That's probably
a distinct bug.)

However, this rewriting is done without consideration of
the accessibility of `v0` from `C2`.

This commit disables this optimization if there if `v0` is
not accessible.
doc fix for Types.baseClasses to match spec definition of Linearization 5.1.2
Scaladoc: Load scripts at the bottom, and with a defer attribute

To improve latency on modern browsers (which supports defer) and old browsers:

 * https://www.webkit.org/blog/1395/running-scripts-in-webkit/
 * http://developer.yahoo.com/blogs/ydn/posts/2007/07/high_performanc_5/
SI-7290 Minor cleanups driven by review comments.

  - make a def a val, we only need to compute it once
  - add a clarifying comment
  - only report the first duplicate
Run test.scaladoc before test.suite. Fail fast.