Optimize hasAnnotations

 - avoid indirection through the Function1
 - add this method directly to Annotable
 - Refactor sameElementsEq, use in fasttrack
Move TypeHistory out of the cake

Before:

    scala> val clazz = Class.forName("scala.reflect.internal.Symbols$TypeHistory")
    clazz: Class[_] = class scala.reflect.internal.Symbols#TypeHistory

    scala> println(com.carrotsearch.sizeof.BlackMagic.fieldsLayoutAsString(clazz))
    @12  4 TypeHistory.validFrom
    @16  4 TypeHistory.info
    @20  4 TypeHistory.prev
    @24  8 TypeHistory.$outer
    @32    #shallowSizeOfInstance(scala.reflect.internal.Symbols$TypeHistory)

After:

    scala> val clazz = Class.forName("scala.reflect.internal.TypeHistory")
    clazz: Class[_] = class scala.reflect.internal.TypeHistory

    scala>  println(com.carrotsearch.sizeof.BlackMagic.fieldsLayoutAsString(clazz))
    @12  4 TypeHistory.validFrom
    @16  4 TypeHistory.info
    @20  4 TypeHistory.prev
    @24    #shallowSizeOfInstance(scala.reflect.internal.TypeHistory)
Banish an unwanted field from TermSymbol

Before:
    scala>  println(com.carrotsearch.sizeof.BlackMagic.fieldsLayoutAsString(clazz))
    @12  4 SymbolContextApiImpl.$outer
    @16  8 Symbol._rawflags
    @24  4 Symbol.id
    @28  4 Symbol._validTo
    @32  1 Symbol.isOverridingSymbol
    @33  3 Symbol.bitmap$0
    @36  4 Symbol.initName
    @40  4 Symbol._rawowner
    @44  4 Symbol._privateWithin
    @48  4 Symbol.scala$reflect$internal$Symbols$$infos
    @52  4 Symbol._annotations
    @56  4 Symbol.rawatt
    @60  4 TermSymbol._referenced
    @64  8 TermSymbol.validAliasFlags
    @72  8 TermSymbol._rawname
    @80    #shallowSizeOfInstance(scala.reflect.internal.Symbols$TermSymbol)

After:
    scala>  println(com.carrotsearch.sizeof.BlackMagic.fieldsLayoutAsString(clazz))
    @12  4 SymbolContextApiImpl.$outer
    @16  8 Symbol._rawflags
    @24  4 Symbol.id
    @28  4 Symbol._validTo
    @32  1 Symbol.isOverridingSymbol
    @33  3 Symbol.bitmap$0
    @36  4 Symbol.initName
    @40  4 Symbol._rawowner
    @44  4 Symbol._privateWithin
    @48  4 Symbol.scala$reflect$internal$Symbols$$infos
    @52  4 Symbol._annotations
    @56  4 Symbol.rawatt
    @60  4 TermSymbol._referenced
    @64  8 TermSymbol._rawname
    @72    #shallowSizeOfInstance(scala.reflect.internal.Symbols$TermSymbol)
Comment about possible memory optimization of ScopeEntry

It ain't worth it.
Optimize backend: avoid findMember

Avoid an expensive findMember when a cheap
hasNonPrivateMember will do.
Optimize Symbols

  - cache isMonomorphicType
  - mixin TopLevelSymbol to symbols initially owned by package classes,
     this trait shortcuts name / owner / isTopLevel / isLocal
  - refactor typeParams to make it easier to profile and to reduce the bytecoede size on the fast path
Optimize post typer phase typechecking

Don't check for double definitions, and don't look for
synthetics.

This optimization was already applied for Erasurer,
but by moving the threshold back we can speedup
uncurry.
Optimize TreeDSL

 - arity overload for BLOCK to avoid array creation.
Use eq rather than == for hot name comparison
Move constants out a level

Avoids reading system properties so often.
Avoid type maps in later phases

By-name and repeated parameter types won't exist
post typer.
Optimize ByteCodeWriters

Only run the error diagnostic for "you have a file in the way, dufus!"
if we hit an IOException.

Also routes around another layer of `isDirectory` assertions in `AbstractFile`

Saves a large number of repeated calls to file("/target/classes/com").isDirectory.

Even with the pipelined bytecode emission by GenBCode, this seems to offer a
small improvement in benchmarks.

Manual Test:

    % cat sandbox/test.scala
    package foo {
      package bar {
        class D
      }
    }

    % touch foo
    % qbin/scalac sandbox/test.scala
    sandbox/test.scala:3: error: error writing class D: ./foo/bar/D.class: ./foo is not a directory
        class D
              ^
    one error found
    % rm foo
    % mkdir foo; touch foo/bar
    % qbin/scalac sandbox/test.scala
    sandbox/test.scala:3: error: error writing class D: ./foo/bar/D.class: ./foo/bar is not a directory
        class D
              ^
    one error found