Reporter refactoring

Refactored reporters to increase clarity and to pave the way for having Diagnostics subclasses.
Pos tests t17xx - t19xx
Fix of SI 2133

We now restrict wildcard imports to members that are accessible at the point of import. This is a fix of an open Scala ticket.
Tests pos 20xx 21xx
More systematic treatment of prototypes.

There's a delicate balance about how much of a prototype should be passed down the
tree when typechecking. Passing little can cause ambiguity errors (both in overloading
and in implicit search). Passing too much can cause spurious errors because implicit conversions
"down the road" that apply to some tree continaing the result might not be considered.

Symptoms of the problems wree that we could not handle the tests included in this commit before.

The new scheme is as follows: we always keep all available information in a prototype, but hide nested
prototypes behined a `IgnoredProto` wall. These trees will not be considered for conformity checking.
When type checking hits an ambiguity, it tries again with a prototype that's one level deeper (has fewer
Ignore links) than the previous one. This continues until there are no more Ignore links to unwrap.

We also generalize the scheme for wrapping qualifiers of select nodes from realApply to all instances where
we compare against a FunProto.

Finally, there are some fixes that avoid assertion violations that were provoked by the new typechecking scheme.
Better printing of anonymous classes.

Used to be just $anon, now is `Ps { ... }`, where `Ps` are
the instantiated parents of the anonymous class.
Avoid hoisting of local classes out of method bodies.

Doing so is unsound. We instead approximate local classes by their parents, but
only if the expected type is not fully defined.

This makes the test t2421_delitedsl1.scala in the commit pass. The oter test,
blockEscapesNeg.scala is modified to fail. Previously it failed outright but with the
new rules the nested class Bar is approximated to Object. That means that the block
containing `Foo.Bar` typechecks, but with type `Object` instead of the unreachable `Bar`.
Tests pos/23xx to 24xx.
Nothing is not a superclass of Null.

Fix so it isn't.

This caused an error in ErrorReporting because we do not propagate
bounds into a type like ValOrDefDef[_]. Error in `ErrorReporting` is now fixed but the problem is
reflected in test case `boundspropagation`.
Changed .gitignore to ignore /classes instead of /bin.

bin as output directory clashes with bin/dotc.

Btw I have no idea why I cannot ignore .gitignore. I have .gitignore in my .gitignore_global
and have configured git to respect that, but no cigar.
Fix of pos/t2429

This was a hard nut to crack. The problem exemplified by t2429 is that in a situation like

     val x: T = foo(...)

where `foo` needs implicit parameters the expected result type `T` is propagated into the
typechecking of foo(...) and consequently also into the implicit parameter search. This
is often necessary, for instance to instantiate type parameters. But it can lead to overconstrained
searches if in fact the right expansion is

     val x: T = viewToT(foo(...)(implicit params))

where `viewToT` is some implicit conversion. The fix handles that case by re-hecking the
application foo(...) with an empty result type, if the implicit parameter search fails.
But the re-checking is very subtle as is explained in the comment to `TyperState#tryWithFallback`.
Make java file compile under 1.6.

I still have 1.6 installed. So the two simple fixes are necessary to make my build pass for now.
Fix of pos/t2454

"_" type paraeters need to be given fresh names.
Refinements in diagnostics

1) glb/lub's are reported to subtyping printer instead of typr
2) Null arguments of function protos are printed with their types
   (views sometimes are transformed into these).
Reporter fix

This fixes a bug introuced by 7754c1ee6c4230e424fd99b820471dbd2c1c8390.

The reporter state need to be reset undconditionally in a tryWithFallback.
Fix of t2504

Another problem where we need to insert an implicit on the result type of complex operation.

Two additions: (1) If adapt fails, we now try with a weaker FunProto without result type, thus
allowing for an additional implicit cpmversion on the result. (2) An Application in a committable
context will not fail if the result type does not match the expected one. The problem will be
simply deferred in that case.
Added t25xx tests
Fix of t2591.

Needed to wrap a dummyTreeOfType in a TypedSplice to prevent re-typechecking. (In fact, the
"tree without pos" check revealed a deeper problem: DummyTrees of types could be typed again,
but without the surrounding TypedSplice, the originally stored type would be forgotten and Null
would be returned.
Fix of t2660.

Auxiliary constructors need to be wrapped in the type parameters of the primary constructor.
Otherwise they will not take part in type inference.
typedTyped needs to maintain Mode.

The first part of a type ascription e: T can be a pattern or an expression. The mode
has to be kept depending on what it was on the outside.