Move a test from pos to run to highlight bytecode deficiencies.

We'll address them in subsequent commits.
SI-6666 Account for nesting in setting INCONSTRUCTOR

This flag is calcualed in Namers, and assigned to class
and module class symbols that are defined in self/super-calls,
and in early definitions.

For example, class D is INCONSTRUCTOR in each case below:

    class C extends Super({class D; ()})
    class C(a: Any) {
      def this(a: Any) = this({class D; ()})
    }
    new { val x = { class D; () } with Super(())

But, the calculation of this flag failed to account for
nesting, so it was not set in cases like:

    class C(a: Any) {
      def this(a: Any) = this({val x = {class D; ()}; x})
    }

This patch searches the enclosing context chain, rather than
just the immediate context. The search is terminated at the
first non term-owned context. In the following example, this
avoids marking `E` as INCONSTRUCTOR; only `D` should be.

    class C extends Super({class D { class E }; ()})

This closes SI-6259 and SI-6506, and fixes one problem
in the recently reopened SI-6957.
Add a test case from the comments of SI-6666.

This one lands in the new implementation restriction
which beats the VerifyError.
Broader checks for poisonous this references.

Replaces more VerifyErrors with implementation restrictions.
SI-6666 Catch VerifyErrors in the making in early defs.

As we did for self/super calls, add a backstop into
explicitouter and lambdalift to check when we try to
get an outer pointer to an under-construction instance.
Class symbols can't be contravariant.

During development of the fix for SI-6666, I encountered:

    % test/files/pos/t4842.scala
    test/files/pos/t4842.scala:10: error: contravariant class Bar occurs in covariant position in type ()this.Bar of constructor Bar
         this(new { class Bar { println(Bar.this); new { println(Bar.this) } }; new Bar } ) // okay

I had incorrectly set the INCONSTRUCTOR flag on the class symbol
`Bar`. (It isn't directly in the self constructor call, as it
is nested an intervening anonymous class.)

But, this flag shares a slot with CONTRAVARIANT, and the variance
validation intepreted it as such.

ClassSymbol already has this code to resolve the ambiguous
flags for display purposes:

    override def resolveOverloadedFlag(flag: Long) = flag match {
      case INCONSTRUCTOR => "<inconstructor>" // INCONSTRUCTOR / CONTRAVARIANT / LABEL
      case EXISTENTIAL   => "<existential>"   // EXISTENTIAL / MIXEDIN
      case IMPLCLASS     => "<implclass>"     // IMPLCLASS / PRESUPER
      case _             => super.resolveOverloadedFlag(flag)
    }

This commit overrides `isContravariant` to reflect the same logic.
SI-6989 privateWithin is now populated in reflect

Runtime reflection in JavaMirrors previously forgot to fill in
privateWithin when importing Java reflection artifacts. Now this is fixed.
[nomaster] doesn't touch NonemptyAttachments

NonemptyAttachments in macro API used to be Attachments$NonemptyAttachments.
However it's private, so noone outside scala.reflect.macros can access it,
making it ineligible for the incompatibility criterion.
[nomaster] removes Tree.canHaveAttrs

This forward compatibility fix is very easy. Have a new method in 2.10.1?
Don't expose it in the public API, and you won't have any problems.
[nomaster] revives BuildUtils.emptyValDef

That method was unnecessary in the first place, because we already had
emptyValDef in scala.reflect.api.Trees: https://github.com/scala/scala/blob/v2.10.0/src/reflect/scala/reflect/api/Trees.scala#L2367.
That's a rudiment from the times when we were unsure what to put into
scala.reflect.base and what goes into scala.reflect.api.

Unfortunately, it's not just a harmless extraneous method. Reifier v2.10.0
emits `u.build.emptyValDef` when it needs to reify `emptyValDef`. Therefore
we need to restore it to be forward compatible.

However we don't need to rollback the changes to the reifier v2.10.1,
which now simply calls `u.emptyValDef`, because, as mentioned above,
that `emptyValDef` was already there in v2.10.0.
[nomaster] Revert "s/SuperCallArgs/SuperArgs/"

This reverts commit 2621918870e531b7a9bcccdf14bddea9b89804b2.
[nomaster] Revert "more ListOfNil => Nil"

This reverts commit bb9adfbd76af0a0281912fcef4bcaca409a7c9a3.
[nomaster] Revert "DummyTree => CannotHaveAttrs"

This reverts commit 838cbe623c142b7005446793948097f679219fe3.

Conflicts:
	src/reflect/scala/reflect/api/Trees.scala
SI-6888 Loosen criteria for $outer search.

In order to cater for nested classes with names that end
with '$', which lead to ambiguity when unmangling expanded
names.

In:

    class X { object $ }

We end up with:

    orginalName(X$$$$$outer) = $$$outer

This change modifies `outerSource` to consider that to be
and outer accessor name. It is a piecemeal fix, and no doubt
there are other nasty surprises in store for those inclined to
flash their $$$ in identifier names, but the method changed is
not used widely and this solves the reported problem.

SI-2806 remains open to address the deeper problem.
[nomaster] Revert "introduces global.pendingSuperCall"

This reverts commit 0ebf72b9498108e67c2133c6522c436af50a18e8.

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
	src/reflect/scala/reflect/internal/Trees.scala
[nomaster] Revert "refactors handling of parent types"

This reverts commit 40063b0009d55ed527bf1625d99a168a8faa4124.

Conflicts:
	src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
	src/compiler/scala/tools/nsc/typechecker/Typers.scala
[nomaster] verifies compat with 2.10.0

Makes sure that the compiler understands the 2.10.0 format of super
constructor calls after the recent revert from the typemacro-compatible
format.
introduces an exhaustive java-to-scala test

Originally composed to accommodate pull request feedback, this test has
uncovered a handful of bugs in FromJavaClassCompleter, namely:
* SI-7071 non-public ctors get lost
* SI-7072 inner classes are read incorrectly

I'm leaving the incorrect results of FromJavaClassCompleters in the check
file, so that we get notified when something changes there.
Add a request to presentation compiler to fetch doc comment information.
Refactor scaladoc base functionality to allow it to be mixed in with Global in the IDE.
SI-7070 Turn restriction on companions in pkg objs into warning

The implementation restriction created from SI-5954 in
3ef487ecb6733bfe3c13d89780ebcfc81f9a5ea0 has two problems.

1) The problematic code works fine if compile with sbt. That means the
restriction is breaking some people needlessly.

2) It's not binary compatible.

To fix all that this commit changes the error into a warning and removes
the setting used to get around the restriction.