Set currentUnit while generating bytecode.
Remove Tracked, add type information to ClassBType

Before this change, a ClassBType was just a name. The `exemplars` map
stored a Tracked instance for every ClassBType. Tracked stored
type information that is required later in the backend when things
may run concurrently. In particular: superclass, interfaces, flags
and information for emitting the InnerClass attribute. Now we put all
the information stored in Tracked directly in the ClassBType.

There is still one hash map: `classBTypeFromInternalNameMap` maps
a JVM internal class name (e.g. "scala/Predef$") to the corresponding
ClassBType. This map is used during bytecode generation, when the
ASM framework computes stack map frames.

In order to compute stack map frames, the ASM framework needs to be
able to get the LUB of two types. The default implementation uses
reflection to get type information, however that doesn't work in our
case: the classes we compile are not on the classpath. So instead,
the backend overwrites the method `getCommonSuperClass` of the
ClassWriter. This method receives two class internal names and
computes their LUB. This is done by looking up the ClassBTypes in the
`classBTypeFromInternalNameMap` and invoking `jvmWiseLUB`.

This commit was reviwed in https://github.com/scala/scala/pull/3855.
It consists of all commits labelled [squash-after-review], squashed
into one.
Add the ACC_DEPRECATED flag in javaFlags, instead of each call site.
Minor cleanups, integrating review feedback

Review was in https://github.com/scala/scala/pull/3855
Integrate CoreBTypes by composition (not inheritance), non-var fields

Make the fields of CoreBTypes non-variable. Instead, replace the
CoreBTypes instance on each compiler run. That results in fewer
variables, and the initialization code is directly where the fields
are declared, instead of an init method.
Fix indentation in delambdafy
Don't traverse all trees in delambdafy phase if delambdafy:inline

If delambdafy:method is not enabled, the delambdafy method is a nop.
Fix InnerClass / EnclosingMethod attributes

This commit seems bigger than it is. Most of it is tests, and moving
some code around. The actual changes are small, but a bit subtle.

The InnerClass and EnclosingMethod attributes should now be close to
the JVM spec (which is summarized in BTypes.scala). New tests make
sure that changes to these attributes, and changes to the way Java
reflection sees Scala classfiles, don't go unnoticed.

A new file, BCodeAsmCommon, holds code that's shared between the two
backend (it could hold more, future work).

In general, the difficulty with emitting InnerClass / EnclosingMethod
is that we need to find out source-level properties. We need to make
sure to do enough phase-travelling, and work around destructive
changes to the ownerchain in lambdalift (we use originalOwner a lot).

The change to JavaMirrors is prompted by the change to the
EnclosingMethod attribute, which changes Java reflection's answer to
getEnclosingMethod and getEnclosingConstructor. Classes defined in
field initializers no longer have an enclosing method, just an
enclosing class, which broke an assumption in JavaMirrors.

There's one change in erasure. Before this change, when an object
declaration implements / overrides a method, and a bridge is required,
then the bridge method was actually a ModuleSymbol (it would get the
lateMETHOD flag and be emitted as a method anyway). This is confusing,
when iterating through the members of a class, you can find two
modules with the same name, and one of them doesn't have a module
class. Now, such bridge methods will be MethodSymbols.

Removed Symbol.originalEnclosingMethod, that is a backend thing and
doesn't need to live in the symbol API.
Small cleanup in toTypeKind.
Merge pull request #3931 from lrytz/opt/tracked-final

GenBCode refactoring (remove Tracked) and fix InnerClass / EnclosingMethod attributes