[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
SI-7519: Additional test case covering sbt/sbt#914

(cherry picked from commit e72c32db03b44d6eaf1c1872765a578c5445e15f)
Merge pull request #3072 from retronym/backport/7519

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