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.
SI-6718 fixes a volatile test
Adds a margin stripping string interpolator.

Currently only for compiler internal use.

Designed to avoid surprises if the interpolated values
themselves contain the margin delimiter.

Before:

    val bip = "\n  |.."

     s"""fooo
        |bar $bip
        |baz""".stripMargin

    "fooo
    bar
    ..
    baz"

After:

    sm"""fooo
        |bar $bip
        |baz"""

    "fooo
    bar
      |..
    baz"
Take advantage of the margin stripping interpolator.

Safer and shorter.
SI-5753 macros cannot be loaded when inherited from a class or a trait

enclClass should be taken from Tree otherwise we can jump to declaration
class/trait.
neg test added