Revert "Closes #4560. Review by dragos." (introduction of safeREF)

This reverts commit 124cf3f9cbdc582a432c13edd229ba9b8726b99f.

Conflicts:

	src/compiler/scala/tools/nsc/transform/CleanUp.scala
Revert "tentative fix for RC5 lift build problem."

This reverts commit cb4fd65825f3c88908103e48d0d7e89d70d26c22.

Conflicts:

	src/compiler/scala/tools/nsc/symtab/Types.scala
	src/compiler/scala/tools/nsc/typechecker/Contexts.scala
SI-4560 - improved test

Added all the known cases of failing self-types. Added tests for symbol
access (SI-4601) as well which should now be fixed for all of the same cases
as well.
hotfix for TwoWayCache
Merge pull request #989 from scalamacros/topic/hotfix

hotfix for TwoWayCache
Merge pull request #976 from adriaanm/ticket-4440b

SI-4440 workaround: avoid outer accessor that'll vanish
Merge pull request #985 from scalamacros/ticket/6112

SI-6112 exposes symbol mutators in macro universe
Merge pull request #986 from scalamacros/ticket/6075

SI-6075 cleans up api.StandardNames
SI-6140 Scaladoc infinite recursion in wiki parser

introduced by dc70d1b7.
Optimization in List.

Mark all the closure-accepting methods which have implementations
within List as @inline final so the closures can be eliminated.
(All the methods are effectively final anyway, as Nil and :: are
the only possible subclasses.) And compromise with respect to
the inlining of inherited methods by overriding foreach (responsible
for over 300 closures) with an inlinable implementation.

Review by @gkossakowski.
Remove typesafe-config as dependency for library.  Akka-actors will draw it in.
Merge pull request #949 from paulp/topic/hidden

Expanded use of HIDDEN flag.
SI-5958 This deserves a stable type

`this` (or the self variable) passed as an actual argument to a method
should receive a singleton type when computing the method's resultType

this is necessary if the method's type depends on that argument
Merge pull request #993 from jsuereth/fix/typesafe-config-removal

Remove typesafe-config as dependency for library.  Akka-actors will draw...
Instrument all classes in `instrumented` package.

Extend instrumenting infrastructure to instrument
classes in `instrumented` package. This is useful
because very often you need to put your classes
into non-empty package. E.g. inliner doesn't work
properly with empty package at the moment so in
order to test any behaviour we need to put classes
in some other package that is instrumented.

Added testing code for that to instrumentation
test-case.

Review by @phaller.
Fix `Instrumentation.getStatistics` method in partest.

The previous implementation was wrong because it
would always enable profiling after call to
`Instrumenation.getStatistics` method. Now we are
checking the profiling status and enable it again
only when it was enabled before.

Review by @phaller.
`ScriptSourceFile` should not hard-code `OffsetPosition`.

The presentation compiler should support script source files as well, but it needs range positions. This commit
fixes an oversight when `RangePosition` was introduced.
Avoids loading scala.package and scala.reflect.package from source if a classfile exists.

We know that loading these packages from source leads to compilation errors. To reproduce: Update scala.reflect.package, make sure it is on the source path and recompile anything using it. You will get a number of errors having to do with ClassTags and macro expansions. With the patch, these errors go away because the package is not loaded as long as a classfile exists.
Refined isEffectivelyFinal logic for sealedness.

If the enclosing class of a method is sealed and has only final
subclasses, then the method is effectively final in the sealed class if
none of the subclasses overrides it. This makes it possible to inline
more methods without explicitly marking them final.

Note that the test doesn't fail before this patch due to SI-6142,
a bug in the optimizer, but here's a bytecode diff to prove it:

  @@ -16,8 +16,10 @@ public final class Test$ {
       Code:
   : getstatic                      // Field Foo$.MODULE$:LFoo$;
   : invokevirtual                  // Method Foo$.mkFoo:()LFoo;
  +: pop
   : bipush
  -: invokevirtual                  // Method Foo.bar:(I)I
  +: iconst_1
  +: iadd
   : ireturn

And the test in neg, which is manually made to fail due to the absence
of inline warnings, correctly refuses to inline the methods.

Review by @dragos.
Removed restriction on final vars, SI-2418.

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.