[nomaster] SI-7519 Less brutal attribute resetting in adapt fallback

Prefers `resetLocalAttrs` over `resetAllAttrs`. The latter loses track of
which enclosing class of the given name is referenced by a `This` node which
prefixes the an applied implicit view.

The code that `resetAllAttrs` originally landed in:
https://github.com/scala/scala/commit/d4c63b#L6R804

Cherry picked from 433880e91cba9e1e926e9fcbf04ecd4aeb1d73eb

Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala