Treat name in getResourceAsStream as resource path

The parameter for getResourceAsStream is not a class name. It's a resource path!
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.
Refactor use of SearchFailure in implicits.

Introduces AmbiguousSearchFailure to go with the
the existing SearchFailure, and changes predicates
to use `SearchResult.{isFailure, isSuccess}`.

This doesn't change behaviour; it is a preparatory
commit for SI-6667.
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 SI-6712, bug in object lifting.
SI-6718 fixes a volatile test
SI-6667 Abort after any ambiguous in-scope implicit

Rather than continuing on to a search of implicits
of the expected type.

Previously, the companion implicits were searched if the
the caller was running the implicit search in silent
mode, for example if searching for an implicit parameter
in an application which has an expected type.

After this commit, the behaviour is consistent, regardless
on silent/non-silent typing.