SI-2418, remove restriction on final vars.

[backport]
The original fix for SI-2418 excluded final vars entirely, but
the problem was not final vars per se, but the emission of ACC_FINAL
in combination with ACC_VOLATILE.  Since vars never get ACC_FINAL
now, this is no longer an issue.
SI-4729, overriding java varargs in scala.

[backport]
This was a bad interaction between anonymous subclasses
and bridge methods.

  new Foo { override def bar = 5 }

Scala figures it can mark "bar" private since hey, what's
the difference.  The problem is that if it was overriding a
java-defined varargs method in scala, the bridge method
logic says "Oh, it's private? Then you don't need a varargs
bridge." Hey scalac, you're the one that made me private!
You made me like this! You!

Conflicts:
	src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
SI-5130, precision disappearing from refinement.

[backport]
Remove some code, win a prize.
SI-5353, imperfect error message.

[backport]
The fix of course is a perfect error message.
SI-5859, inapplicable varargs.

[backport]
And other polishing related to varargs handling.
SI-5604, selections on package objects.

[backport]
mkAttributedSelect, which creates a Select tree based on
a symbol, has been a major source of package object bugs,
because it has not been accurately identifying selections
on package objects.  When selecting foo.bar, if foo turns
out to be a package object, the created Select tree must be

  foo.`package`.bar

However mkAttributedSelect was only examining the owner of
the symbol, which means it would work if the package object
defined bar directly, but not if it inherited it.
SI-6072, crasher with overloaded eq.

[backport]
You don't want to do name-based selections in later phases
if you can help it, because there is nobody left to resolve
your overloads.  If as in this example you're calling a
known method, use the symbol.  Review by @hubertp.
SI-6426, importable _.

[backport]
Prohibit `_` as an identifier, it can only bring badness.
SI-6584, Stream#distinct uses too much memory.

[backport]
Nesting recursive calls in Stream is always a dicey business.
SI-6595, lost modifiers in early defs.

[backport]
Saw this by accident; the trees created for early defs would
wholesale replace the modifiers with PRESUPER rather than
combining them. FINAL was lost that way, as would be any other
modifiers which might be valid there.
Merge pull request #2015 from paulp/rc1-backports

10 backports