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
SI-6308 Specialize methods that have some unspecialized params

This is a continuation of 1591c14e50, which didn't go far enough
to handle method calls with a mix of specialized and unspecialized
type parameters.

This commit modifies `specSym` to calculate the residual type
of the original method after specialized type parameters have
been removed and the type environment of the candidate specialized
variant has been subsituted.

For example, here is trace of `specSym` when searcing for the
specialized variant of `f4` in the enclosed test:

    tree             = Main.this.f4[Nothing, Int]
    tree.tpe         = (a: Int, b: List[(Int, Nothing)])String
    fun.tpe          = [B, A](a: A, b: List[(A, B)])String
    residualTreeType = [B](a: Int, b: List[(Int, B)])String
    memberType       = [B](a: Int, b: List[(Int, B)])String
    env              = Map(type A -> Int)
    doesConform      = true

A few "todo" tests are included that highlight an endemic
issue with the current specialization implementation: type
parameters that show up after `uncurry` might be clones of
the original symbols from typer, if they have been through
a TypeMap (e.g. within a call to `uncurryTreeType`). So testing
them for existence with the `typeEnv` map is fruitless.

No amount of `atPhase` acrobatics can rescue us from this;
we need to transport this information in a symbol-cloning
resiliant manner. Maybe Symbol Attachments?
SI-2464 Resiliance against missing InnerClass attributes

A classfile in the wild related to Vaadin lacked the InnerClasses
attribute. As such, our class file parser treated a nested enum
class as top-level, which led to a crash when trying to find its
linked module.

More details of the investigation are available in the JIRA comments.

The test introduces a new facility to rewrite classfiles.

This commit turns this situation into a logged warning, rather
than crashing. Code by @paulp, test by yours truly.
SI-7564 Fix detection of reflective calls on Avian

Base_1.scala checks whether reflection was used by inspecting
the stacktrace and looking for “java.lang.reflect.”.

The stacktrace looks differently on Avian and therefore the
test fails.

This change looks for “sun.reflect.” instead, which seems to
work on OpenJDK and Avian.
Eliminate needless Options.

Many of our core types have dedicated sentinels which serve
perfectly to communicate "no value", even more perfectly than
None. Saving a billion allocations is gravy.
Merge pull request #2639 from retronym/ticket/2464

SI-2464 Resiliance against missing InnerClass attributes
SI-6503 Fix scaladoc output to generate valid HTML5

I checked the generated HTML with the validators provided by
http://validator.w3.org/ and http://html5.validator.nu/ to verify that
all issues have been fixed.

Changes:
- Adapt doctype
- Remove processing instructions
- Add alt attributes to image tags

Before that, the output tried to be XHTML 1.1, but failed validation as
attested by both validators mentioned above, making it more likely to
trigger the quirks modes in browsers.
Merge pull request #2642 from soc/SI-7564

SI-7564 Fix detection of reflective calls on Avian
Merge pull request #2630 from retronym/ticket/6308

SI-6308 Specialize methods that have some unspecialized params
Merge pull request #2596 from retronym/ticket/7519

SI-7519 Less brutal attribute resetting in adapt fallback
Merge pull request #2533 from soc/SI-6503

SI-6503 Fix doctype, remove processing instructions, ...
Merge pull request #2617 from paulp/pr/use-dedicated-sentinels

Eliminate needless Options.