SI-6677 Insert required cast in `new qual.foo.T`

Short version: we sometimes need to rewrite this as

    new T(qual.asInstanceOf[OwnerOfFoo].foo)

Long version:

`adaptMember` in Erasure performs a few tasks, among them:

1. adding an empty argument list to qualifiers in `new qual.T`
    for which `qual` is a val template member that has
    (post uncurry) a MethodType with an empty parameter list.

    The same rewriting was already applied in uncurry for such
    qualifiers appearing in other contexts, e.g. `qual.foo` was
    already rewritten to `qual().foo`.
2. casting, if necessary, the qualifier in `Select(qual, name)`
    to the type of owner of the symbol that this selection
    references.

    This can be neccesary with compound types:
     - some val class member has type `A with B`;
     - we instantiate `new ab.valMemberOfB.T`
     - we must pass `ab.valMemberOfB` to the constructor of `T`
       as the `$outer` pointer
     - we must cast `ab` to `B` before calling `valMemberOfB`.

    Failure to insert this cast can lead to a LinkageError or
    a VerifyError.

However, if 1) was performed, 2) was not.

The error is pretty easy to trigger with the new reflection
API:

    class Test {
      val cm: reflect.runtime.universe.Mirror
          = reflect.runtime.currentMirror
      def error {
        new cm.universe.Traverser // java.lang.VerifyError
      }

      def okay1 {
        val cm: reflect.runtime.universe.Mirror = reflect.runtime.currentMirror
        new cm.universe.Traverser
      }
    }

The fix applied here to `adaptMember` mirrors the existing
implementation of `adaptType`.
Refactoring of adaptMethod

Avoid the early return, and address micro-duplication
between adaptType and adaptMember.
Fix for SI-6357, cycle with value classes.

Don't force the owner info.
findEntry implementation code more concise and DRYer.
Fix for SI-6706, Symbol breakage under GC.

Ensure the map key and the String in the Symbol are the
same reference by removing the old key before updating the
map with the new key -> symbol relation.
Fix for SI-6687, wrong isVar logic.

Fields which back lazy vals need to be excluded via !isLazy
lest isVar return true.
Set symbol flags at creation.

All should prefer passing flags at symbol creation to mutating
the flags field after creation.
Mark pattern matcher synthetics as SYNTHETIC.

Flagging synthetics accurately is important to allow for
useful static analysis.
Merge pull request #1662 from paulp/issue/6706

Fix for SI-6706, Symbol breakage under GC.
Merge pull request #1643 from retronym/ticket/6677

SI-6677 Insert required cast in `new qual.foo.T`
Merge pull request #1647 from adriaanm/backport-1626-2.10.x

Fix for SI-6357, cycle with value classes.
Merge pull request #1652 from jedesah/FlatHashTable

findEntry implementation code more concise and DRYer.
Merge pull request #1663 from paulp/merge-2.10.wip-x

Merge 2.10.0-wip into 2.10.x.
Merge pull request #1665 from paulp/issue/6687

Fix for SI-6687, wrong isVar logic.
Merge pull request #1666 from paulp/issue/6707

Flag pattern matcher synthetics as synthetic.
Fix for SerialVersionUID instability.

Can hardly believe this has been broken for a decade or so, but
there it is - see test case. Four classes attempt to set their
SerialVersionUID to 13. One succeeds. No warnings or errors. The
output before this patch (for me anyway - your random numbers may
differ) was:

  860336111422349646
  13
  8409527228024057943
  -7852527872932878365

There was already code in place for rejecting annotations
with non-constant args when constant args are required, but
that check is only performed on ClassfileAnnotations, and
SerialVersionUID was a StaticAnnotation. Maybe people don't
reach for ClassfileAnnotation because of this giant warning
which I see no way to suppress:

  warning: Implementation restriction: subclassing Classfile does
  not make your annotation visible at runtime. If that is what you
  want, you must write the annotation class in Java.

Why did I change the name of the field from uid to value?
If you don't use the name 'value', you have to name the argument
every time you use it, even if it's the only parameter. I didn't
relish breaking every usage of scala's @SerialVersionUID in the
known universe.
Eliminate some one-arg asserts.

The only thing more fun than debugging non-deterministic
scaladoc crashes unrelated to one's change is doing so with
all one-argument asserts.
Account for existence of scala's ClassfileAnnotation.

Apparently this thing is not real well tested, as the
scaladoc code was written as if it does not exist.
Disabled part of a test.

Hmmm, the giant blob of binary data embedded in a test
suddenly stopped working. What does one do in this spot.
SI-6718 fixes a volatile test